Skip to content
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 error on accessing a constant list defined in a module #41942

Merged
merged 10 commits into from
Mar 20, 2024

Conversation

poorna2152
Copy link
Contributor

@poorna2152 poorna2152 commented Jan 5, 2024

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues.

Fixes #41901

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

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • 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

@poorna2152 poorna2152 added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Jan 5, 2024
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.68%. Comparing base (5e3bae1) to head (0016c1c).
Report is 103 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #41942   +/-   ##
=========================================
  Coverage     76.67%   76.68%           
- Complexity    53094    53099    +5     
=========================================
  Files          2884     2884           
  Lines        200207   200209    +2     
  Branches      26076    26076           
=========================================
+ Hits         153516   153526   +10     
+ Misses        38260    38256    -4     
+ Partials       8431     8427    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chiranSachintha
Copy link
Member

In the current implementation, symbol accessibility is verified using the type symbol((

checkAccessSymbol(Types.getImpliedType(node.getBType()).tsymbol, data.env.enclPkg.symbol.pkgID, node.pos);
)). IMO, this approach is not correct, we should use the symbol of that node, rather than using the symbol of the type linked to that node. @MaryamZi WDYT?

prakanth97
prakanth97 previously approved these changes Mar 14, 2024
Copy link
Contributor

@prakanth97 prakanth97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@poorna2152 poorna2152 force-pushed the const_list branch 2 times, most recently from c20e6e1 to a6e5afa Compare March 18, 2024 11:10
@MaryamZi MaryamZi added this to the 2201.9.0 milestone Mar 20, 2024
@MaryamZi MaryamZi merged commit c7c5ee4 into ballerina-platform:master Mar 20, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Error when accessing a const array defined in a module
5 participants