Disallow overloading from breaking stable patterns#18327
Disallow overloading from breaking stable patterns#18327dwijnand merged 2 commits intoscala:mainfrom
Conversation
In particular, must continue to use the type's prefix, rather than the denotation's prefix. That way, e.g. in tests/neg/i3812b.scala, referencing value class'\''s value, will fail on the non-stable value class prefix, rather than the denotation'\''s prefix, which is NoSymbol.
|
I had commented on the ticket:
But I noticed that it works fine in Scala 2, so that's precedent for considering this simply a regression and not a design change. And Dale points out that the workaround suggested by original reporter, So all of that together convinces me that we don't need to question this as a design change, it's okay to just make it work. |
|
Implementationwise, perhaps it would be more elegant to put the new smarts inside |
SethTisue
left a comment
There was a problem hiding this comment.
Dale has tried putting it in isStable and all the tests still pass. Offhand, we can't think of any additional tests we could add that might show a difference.
So I'm going to hit "approve", but it isn't obvious to me which implementation is better. Perhaps someone else would like to weigh in on that? If nobody else has an opinion, Dale could make the call.
No description provided.