ballerina-lang
ballerina-lang copied to clipboard
Fix `BFields` of generated immutable `BRecords` not being marked as `SymbolFlags.READONLY`
Purpose
Fixes https://github.com/ballerina-platform/ballerina-lang/issues/42520
Approach
After a discussion with @heshanpadmasiri, it was apparent the InherentTypeViolation
error for BFields
of readonly BRecords
were not getting triggered. This was due to the mutable BRecord
generation not inheriting the readonly flag to the generated BFields
.
After refactoring the logic to make the BFields
also inherit the readonly flag, both cases mentioned in https://github.com/ballerina-platform/ballerina-lang/issues/42520 triggered the same error.
Samples
Provide high-level details about the samples related to this feature.
Remarks
List any other known issues, related PRs, TODO items, or any other notes related to the PR.
Check List
- [x] Read the Contributing Guide
- [ ] Updated Change Log
- [ ] Checked Tooling Support (#<Issue Number>)
- [ ] Added necessary tests
- [ ] Unit Tests
- [ ] Spec Conformance Tests
- [ ] Integration Tests
- [ ] Ballerina By Example Tests
- [ ] Increased Test Coverage
- [ ] Added necessary documentation
- [ ] API documentation
- [ ] Module documentation in Module.md files
- [ ] Ballerina By Examples
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale
label is removed or commented.
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale
label is removed or commented.
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale
label is removed or commented.
Closed PR due to inactivity for more than 18 days.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.35%. Comparing base (
4d2abe5
) to head (fab7ee8
). Report is 6 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #42521 +/- ##
============================================
+ Coverage 77.34% 77.35% +0.01%
- Complexity 58587 58592 +5
============================================
Files 3460 3460
Lines 219862 219860 -2
Branches 28914 28914
============================================
+ Hits 170055 170077 +22
+ Misses 40391 40368 -23
+ Partials 9416 9415 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale
label is removed or commented.
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale
label is removed or commented.
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale
label is removed or commented.
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale
label is removed or commented.