ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

Incorrect diagnostic property in query expression

Open TharushiJay opened this issue 2 years ago • 0 comments

Description: Consider the diagnostic variable assignment is required at cursor position.

Screenshot 2022-08-19 at 09 29 30

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[].

Screenshot 2022-08-19 at 09 28 14

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)

TharushiJay avatar Aug 19 '22 04:08 TharushiJay