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

[Bug]: The `typeOf(Node)` API generates `No value present` for an expression defined in a module

Open nipunayf opened this issue 1 year ago • 0 comments

Description

$title. Note that this issue cannot be reproduced when the respective expression node is within the default module.

image

The node information is shown below: image

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

nipunayf avatar Mar 29 '24 05:03 nipunayf