-
Notifications
You must be signed in to change notification settings - Fork 753
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]: Getting NPE for a simple test with the Dead Code Elimination #43552
Comments
Seems to be happening with langlib function calls. Reproducible when the function is in the source too, rather than tests. Source public function includesFn(string a, string b) returns boolean {
return a.includes(b);
} Tests import ballerina/test;
@test:Config
function test() {
boolean res = includesFn("foo", "bar");
test:assertFalse(res);
} Issue could be related to |
Seems like the error goes away when the start index is provided. E.g., return a.includes(b, 4); |
We've added some fixes which are available with |
With the provided timestamped version, the tests are running without any NPE issues. Hence closing this issue |
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
Getting the following error when running a simple test assertion with string
includes
API.This is found while checking url module with dead code elimination(Related task - ballerina-platform/ballerina-library#7339)
Steps to Reproduce
Try to run the following test with dead code elimination feature:
Affected Version(s)
Ballerina SwanLake Update 11(2201.11.x)
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: