Skip to content

Conversation

@DarkDimius
Copy link
Contributor

No description provided.

derivedTree(qual, defn.Any_asInstanceOf, argType)
}

/** 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

/** 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

2 participants