You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the plugin code, the perform method is triggered on the annotation node:
// The perform method will be invoked on the annotation nodepublicvoidperform(SyntaxNodeAnalysisContextcontext) {
// context.node() here returns the http:ResourceConfig annotation nodeOptional<Symbol> symbol = context.semanticModel().symbol(context.node());
// The symbol is empty here
}
The issue arises when trying to retrieve the symbol for the http:ResourceConfig annotation node using the context's semantic model. The returned symbol is empty, which is not the expected behavior.
Steps to Reproduce
No response
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
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:
MohamedSabthar
changed the title
[Bug]: Unable to obtain AnnotationSymbol for annotation defined in the object function.
[Bug]: Unable to obtain AnnotationSymbol for annotation node
Oct 25, 2024
Description
For the Ballerina code snippet below, the compiler plugin does not return a valid symbol and instead returns an empty value:
In the plugin code, the
perform
method is triggered on the annotation node:The issue arises when trying to retrieve the symbol for the
http:ResourceConfig
annotation node using the context's semantic model. The returned symbol is empty, which is not the expected behavior.Steps to Reproduce
No response
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
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: