Skip to content

Conversation

@Blaisorblade
Copy link
Contributor

Fix #5007 (aka scala/bug#5063).
Based on scala/scala@bed3304bf86 and Nicolas' suggestion.

Based on scala/scala@bed3304bf86 and Nicolas' suggestion.
|| (from.tpe isRef defn.NothingClass)
|| (from.tpe isRef defn.NullClass)
|| !(ctx.mode is Mode.ImplicitsEnabled)
|| from.isInstanceOf[Super]
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is pretty cheap compared to the other ones. I'm wondering if it is better moved earlier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I didn't wonder about that... Super is also pretty rare so I'm not sure, but scala/scala@bed3304bf86 still puts it early.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry — I meant to agree on your suggestion but I'm away. I can review your PR for this change.

@allanrenucci allanrenucci merged commit 86c4e72 into scala:master Sep 3, 2018
@allanrenucci allanrenucci deleted the fix-5007-noimpconversion-super branch September 3, 2018 14:17
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