Skip to content

Fix erasure of trait info #264

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

Merged
merged 3 commits into from
Dec 5, 2014
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 5, 2014

After erasure, traits always extend object, and no other class.

The change flushed out three more problems, one in the handling of
Super trees in erasure, another in bridge method generation. and a
third that class RepeatedParam had Seq, which is a trait, as first parent.

Review by @DarkDimius

After erasure, traits always extend object, and no other class.

The change flushed out three more problems, one in the handling of
Super trees in erasure, another in bridge method generation. and a
third that class RepeatedParam had Seq, which is a trait, as first parent.
DarkDimius added a commit that referenced this pull request Dec 5, 2014
@DarkDimius DarkDimius merged commit 8336a0d into scala:master Dec 5, 2014
odersky added a commit to dotty-staging/dotty that referenced this pull request Dec 11, 2014
The previous scheme derived the right bounds, but then failed to use them
because a TypeRef already has a set info (its bounds). Changing the bounds in
the symbol by a side effect does not affect that. This is good! But it showed
that the previous scheme was too fragile because it used a sneaky side effect
when updating the symbol info which failed to propgate into the cached
info in TypeRef.

We now keep GADT computed bounds separate form the symbol info
in a map `gadt` in the current context.
odersky added a commit to dotty-staging/dotty that referenced this pull request Dec 16, 2014
The previous scheme derived the right bounds, but then failed to use them
because a TypeRef already has a set info (its bounds). Changing the bounds in
the symbol by a side effect does not affect that. This is good! But it showed
that the previous scheme was too fragile because it used a sneaky side effect
when updating the symbol info which failed to propgate into the cached
info in TypeRef.

We now keep GADT computed bounds separate form the symbol info
in a map `gadt` in the current context.
odersky added a commit that referenced this pull request Dec 19, 2014
@allanrenucci allanrenucci deleted the fix/trait-erasure branch December 14, 2017 19:23
tgodzik added a commit to tgodzik/scala3 that referenced this pull request Apr 29, 2025
Backport "Warn universal extensions on opaque types" to 3.3 LTS
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.

2 participants