[Bug]: The typeOf
API returns a TypeDescriptorTypeSymbol
instead of an IntersectionTypeSymbol
for a narrowed variable
#42690
Labels
Area/SemanticAPI
Semantic API Related Issues #Compiler
Team/CompilerFETools
Semantic API, Formatter, Shell
Type/Bug
Description
With the change made by #39585, the type of a narrowed symbol should be an intersection type rather than its effective type.
Steps to Reproduce
Use the
typeOf
API on the node covered by the following cursor positions.Affected Version(s)
Ballerina 2201.9.0 (Swan Lake Update 9)
OS, DB, other environment details and versions
OS: macOS 14.4.1 23E224
JDK: openjdk 20.0.2 2023-07-18
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: