public function main() returns error? {
json[] books = [];
map<json>|error a = {
items: from json item in books
let int id = 1
select {
price: check float:fromString(check item.itemBook.price)
}
};
}
but the following doesn't
public function main() returns error? {
json[] books = [];
map<json>|error a = {
items: from json item in books
let int id = 1
select {
price: check float:fromString(check item.itemBook.price),
id: id
}
};
}
Description
$title.
Steps to Reproduce
The following works.
but the following doesn't
Affected Version(s)
2201.5.0
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