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

Simplify variant selection #1554

Merged
merged 3 commits into from
Aug 16, 2024
Merged

Simplify variant selection #1554

merged 3 commits into from
Aug 16, 2024

Conversation

kyouko-taiga
Copy link
Contributor

@kyouko-taiga kyouko-taiga commented Aug 16, 2024

It seems like keeping track of mutation markers to create method/ subscript bundles isn't actually necessary for name resolution to pick the right candidates. Further access reification works better if we don't pre-filter the variants available on a free subscript bundle. For example:

subscript s(_ x: inout Int): Int {
  let { yield x }
  inout { yield &x }
}

public fun main() {
  var n = 0
  inout m = s[&n]
}

Here, name resolution should not filter out the inout variant only because the callee is not marked for mutation.

@kyouko-taiga kyouko-taiga marked this pull request as draft August 16, 2024 12:45
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.59%. Comparing base (f46bc7d) to head (be0f6b2).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1554      +/-   ##
==========================================
+ Coverage   87.58%   87.59%   +0.01%     
==========================================
  Files         372      372              
  Lines       22522    22511      -11     
==========================================
- Hits        19726    19719       -7     
+ Misses       2796     2792       -4     

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

@kyouko-taiga kyouko-taiga force-pushed the simplify-variant-selection branch from 043db30 to be0f6b2 Compare August 16, 2024 13:59
@kyouko-taiga kyouko-taiga marked this pull request as ready for review August 16, 2024 14:00
@kyouko-taiga kyouko-taiga merged commit 3a2840a into main Aug 16, 2024
16 checks passed
@kyouko-taiga kyouko-taiga deleted the simplify-variant-selection branch August 16, 2024 15:05
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