Closed heshanpadmasiri closed 1 month ago
This seems to be an regression introduced with e977d9f3a07835716ef081f62500e0dfec54a866
Reproducible with this sample code
public type File readonly & object {
public function filename() returns string;
};
public function format(File file) {
string line = file.filename();
}
public readonly class VirtualFile {
*File;
public function filename() returns string => "Hello";
}
public function main() {
File d = new VirtualFile();
format(d);
}
The fix will be released with the 9.4 and 10.1 patch versions as well.
https://github.com/ballerina-platform/ballerina-release/issues/2750 https://github.com/ballerina-platform/ballerina-release/issues/2751
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.
- Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
- Reason/Regression - The issue has introduced a regression.
- Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
- Reason/Complex - Issue occurred due to complex scenario.
- Reason/Invalid - Issue is invalid.
- Reason/Other - None of the above cases.
Description
When trying to run nBallerina with the latest master (34a9f70) we get the fallowing error message.
This seems to be a regression introduced around the tag v2201.9.2 though this was not observed with the release version 9.2.
When diagnosing I observed in
diagnostic.class
file this,old (working)
broken (new)
Steps to Reproduce
bal build
target\bin
and runjava -jar nballerina.jar ../../testSuite/01-boolean/not1-e.bal
(this should work with any test file with -e suffix)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