-
Notifications
You must be signed in to change notification settings - Fork 752
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
Fix records with function calls for default values failing code generation #43563
base: master
Are you sure you want to change the base?
Fix records with function calls for default values failing code generation #43563
Conversation
@HindujaB could you point out the location where the tests for the following class is located? Line 50 in 5c9cc32
I tried searching but couldn't find a place. In case there are no tests for that class, could you suggest a place to add the sample test mentioned in #43531? |
...ang/src/main/java/org/wso2/ballerinalang/compiler/bir/optimizer/BIRRecordValueOptimizer.java
Outdated
Show resolved
Hide resolved
...ang/src/main/java/org/wso2/ballerinalang/compiler/bir/optimizer/BIRRecordValueOptimizer.java
Outdated
Show resolved
Hide resolved
As this is covered in default value creation for record fields, we didn't add specific tests. |
7c27f34
to
017c4bc
Compare
017c4bc
to
531fbf2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #43563 +/- ##
============================================
- Coverage 77.56% 77.56% -0.01%
Complexity 58741 58741
============================================
Files 3448 3448
Lines 219678 219679 +1
Branches 28918 28919 +1
============================================
- Hits 170394 170391 -3
- Misses 39892 39897 +5
+ Partials 9392 9391 -1 ☔ View full report in Codecov by Sentry. |
The 1 line that is missing coverage is not a change done in this PR. @rdulmina do we have to add tests for that as well? Also could you try rerunning the stdlib level 6? It is passing in other PRs now. Whatever was failing in that repo might be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Purpose
Fixes #43531
Remarks
The codegen failure was due to corrupted
BIRInstructions
originated fromBIRRecordValueOptimizer
.BIRRecordValueOptimizer
tries to optimize default functions with other function invocations inside their bodies. This was fixed by updating the logic used to identify functions with only constant loads.Check List