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

Enter symbols under their target names after erasure #13269

Merged
merged 2 commits into from
Aug 15, 2021

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Aug 7, 2021

Enter symbols under their target names in their parent scope after erasure.

Fixes #13252

Enter symbols under their target names in their parent scope after erasure.

Fixes scala#13252
@odersky odersky requested a review from sjrd August 7, 2021 21:43
@odersky odersky assigned odersky and sjrd and unassigned odersky Aug 7, 2021
tests/run/i13252.scala Outdated Show resolved Hide resolved
@@ -654,7 +654,14 @@ class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConst
tr1 :: trs1.filterNot(_.isAnyRef)
case nil => nil
}
val erasedDecls = decls.filteredScope(sym => !sym.isType || sym.isClass)
var erasedDecls = decls.filteredScope(sym => !sym.isType || sym.isClass).openForMutations
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
var erasedDecls = decls.filteredScope(sym => !sym.isType || sym.isClass).openForMutations
var erasedDecls = decls.filteredScope(sym => !sym.isType || sym.isClass)

? (see comment below)

@odersky odersky merged commit 1524a5a into scala:master Aug 15, 2021
@odersky odersky deleted the fix-13252 branch August 15, 2021 13:52
@Kordyjan Kordyjan added this to the 3.1.0 milestone Aug 2, 2023
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.

trait val with symbolic name is lost
3 participants