Skip to content

Use unaliased static type in assignable statement - #2913

Open
jbdoderlein wants to merge 2 commits into
usethesource:mainfrom
jbdoderlein:alias-in-assignement
Open

jbdoderlein wants to merge 2 commits into
usethesource:mainfrom
jbdoderlein:alias-in-assignement

Conversation

@jbdoderlein

Copy link
Copy Markdown
Contributor

Assignement used the getStaticType() on receiver instead of getStaticUnaliasedType(), making this valid code produce an UnsupportedSubscript :

alias Matrix[&T] = map[int,map[int,&T]];

void main(){
    Matrix[int] m = (0:(0:0));
    m[1] = (0:1);
}

@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.00000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 45%. Comparing base (3f7f467) to head (0c515b5).

Files with missing lines Patch % Lines
...rc/org/rascalmpl/semantics/dynamic/Assignable.java 35% 12 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2913   +/-   ##
=======================================
- Coverage       45%     45%   -1%     
- Complexity    6803    6806    +3     
=======================================
  Files          844     844           
  Lines        68824   68824           
  Branches     10028   10028           
=======================================
- Hits         31405   31404    -1     
- Misses       35018   35022    +4     
+ Partials      2401    2398    -3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant