ballerina-lang
ballerina-lang copied to clipboard
[Bug]: The `typeOf(Node)` API generates `No value present` for an expression defined in a module
Description
$title. Note that this issue cannot be reproduced when the respective expression node is within the default module.
The node information is shown below:
Steps to Reproduce
Add the following function to a module within a new package, and invoke the typeOf(Node) API for the expression node outlined by the <START> and <END> tags.
public function isEven(int num) returns boolean {
return <START>num % 2 == 0<END>;
}
Affected Version(s)
Ballerina 2201.8.0 (Swan Lake Update 8)
OS, DB, other environment details and versions
OS: macOS 14.2.1 23C71 JDK: openjdk 17.0.8 2023-07-18
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response