Skip to content

Fix #2072: erasure and refchecks #2085

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

Closed
wants to merge 6 commits into from

Conversation

DarkDimius
Copy link
Contributor

No description provided.

@@ -96,23 +96,30 @@ trait TypeTestsCasts {
/** Transform isInstanceOf OrType
Copy link
Member

Choose a reason for hiding this comment

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

Not specific to OrType anymore

@@ -96,23 +96,30 @@ trait TypeTestsCasts {
/** Transform isInstanceOf OrType
*
* expr.isInstanceOf[A | B] ~~> expr.isInstanceOf[A] | expr.isInstanceOf[B]
* expr.isInstanceOf[A & B] ~~> expr.isInstanceOf[A] & expr.isInstanceOf[B]
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind moving this commit to a separate PR? It's not related to fixing #2072 and I'd like to get it in soon because #2082 depends on it.

Copy link
Member

Choose a reason for hiding this comment

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

An identical commit has now been merged as part of #2082


val d = member.symbol.copySymDenotation(initFlags = member.symbol.flags.&~(Flags.Deferred))
d.installAfter(ctx.erasurePhase.asInstanceOf[Erasure])
// Dark magic. Don't look here.
Copy link
Member

Choose a reason for hiding this comment

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

This is not a helpful comment. Someone might need to look at this eventually and will be very confused. Also do you need both installAfter and transformAfter ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also do you need both installAfter and transformAfter ?

Yes. The comment here would entirely repeat all the history of transformAfter. I don't think it's worth simplifying it here. To understand why it's needed here one need to read the entire description of 979ee0f which introduces transformAfter

Copy link
Member

Choose a reason for hiding this comment

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

Then the comment can say "See the commit message of 979ee0f for more information."

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