-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix type-mismatch confusion in types with simple name #19088
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
Fix type-mismatch confusion in types with simple name #19088
Conversation
There are two failing tests:
Both fail because |
There's some further changes I might need to do to get it to compile, but thanks for the suggestion |
82ec1b5
to
7c0ff57
Compare
Took a bit longer than I thought it would and a few iterations, but the current version appears to be satisfying all the existing test expectations. |
@@ -88,7 +88,7 @@ object Message: | |||
def followAlias(e1: Recorded): Recorded = e1 match { | |||
case e1: Symbol if e1.isAliasType => | |||
val underlying = e1.typeRef.underlyingClassRef(refinementOK = false).typeSymbol | |||
if (underlying.name == e1.name) underlying else e1 | |||
if (underlying.name == e1.name) underlying else e1.namedType.dealias.typeSymbol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolasstucki dealiasing within PlainPrinter
didn't seem to make a difference, but this seems to do the trick.
@ausmarton could you squash all commits into one? |
9d7419d
to
792293d
Compare
792293d
to
7480582
Compare
Sorry, I accidentally closed this Pull request. Will create a new one, as I'm unable to reopen this one |
An attempt to fix #18678