-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: RecordTypeSymbol.fieldDescriptors()
returns NPE
#42094
Comments
In the type resolver, |
@nipunayf please note that the sample is updated. The previous one was not reproducing this issue |
The problem can be reduced to the following example. type ErrorDetail record {
string msg;
};
type UserNotFoundError distinct error & error<ErrorDetail> & error<ErrorDetail> ; The error Line 65 in 12560f8
After the first intersection between |
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now. |
Description
I have an error intersection like this:
In the compiler plugin, I am accessing this
UserNotFoundError
type symbol and get the effective error type from the intersection. Then I get the type descriptor of the detail field which is a Ballerina Record Type in this case.When I call
fieldDescriptors()
method on this Record Type I am getting a Null Pointer Error.Please note that this a blocker to this feature which is expected to deliver with update 9:
error
mapping with spec generation for newHTTP error
structure ballerina-library#5135Steps to Reproduce
See the description above.
Java code:
Affected Version(s)
Ballerina SwanLake Update 8 (2201.8.4)
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: