-
Notifications
You must be signed in to change notification settings - Fork 796
Open
Labels
Team/jBallerinaAll the issues related to BIR, JVM backend code generation and runtimeAll the issues related to BIR, JVM backend code generation and runtimeType/Bug
Description
Description
$Subject
Steps to Reproduce
Run the below code with the Config.toml:
import ballerina/io;
public type Foo record {|
int i = 10;
decimal d = 4.5;
|};
public type Bar record {|
Foo foo;
|};
public type Baz Bar;
configurable Baz? baz = ();
public function main() returns error? {
io:println("Hello, World!");
}[baz.foo]
i = 9
d = 9.76error: [Config.toml:(1:1,3:9)] configurable variable 'baz' is expected to be of type '(scan:Baz & readonly)?', but found 'record'Please note that the one of the below changes resolves the issue:
- Change the
decimaltype tofloat - Change the configurable definition as below:
Or
configurable Baz baz = ?; // required
configurable Baz baz = {foo: {}}; // optional with default
Affected Version(s)
Ballerina SwanLake Update 12
OS, DB, other environment details and versions
No response
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
Metadata
Metadata
Assignees
Labels
Team/jBallerinaAll the issues related to BIR, JVM backend code generation and runtimeAll the issues related to BIR, JVM backend code generation and runtimeType/Bug