ballerina-lang
ballerina-lang copied to clipboard
Incorrect diagnostic property in query expression
Description:
Consider the diagnostic variable assignment is required
at cursor position.

In the diagnostic properties which is used to derive the expected type, we get the bType
incorrectly as xml<string>
where it should be string[]
.

For a different case like x1.toBalString()
, we get the type correctly as string
in the diagnostic properties.
Steps to reproduce:
public function main() {
xml x1 = xml `<book>The Lost World</book>`;
from xml element in x1 select element.toBalString();
}
Affected Versions: 2201.2.0 (Swan Lake Update 2)