-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 regression: inline match crash when rhs uses private inlined methods #18595
Conversation
@@ -38,6 +38,7 @@ class CompilationTests { | |||
compileFilesInDir("tests/pos-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")), | |||
compileFile("tests/pos-special/utf8encoded.scala", defaultOptions.and("-encoding", "UTF8")), | |||
compileFile("tests/pos-special/utf16encoded.scala", defaultOptions.and("-encoding", "UTF16")), | |||
compileDir("tests/pos-special/i18589", defaultOptions.and("-Ysafe-init").without("-Ycheck:all")), |
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.
is there a reason for these special flags? maybe a comment would help
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.
Yeah, basically "-Ycheck-all"
option causes this test to fail. But this isn't a regression caused by #18557 it seems to had been this way before. It would be nice to fix it though.
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.
What's the failure?
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.
Some positions in the tree are missing.
*** error while checking tests/pos-special/i18589/test_1.scala after phase inlining ***
assertion failed: position not set for NamedCodecPlatform.Builder[Any] # -1
of class dotty.tools.dotc.ast.Trees$TypeTree in tests/pos-special/i18589/test_1.scala
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.
Fair enough. Looks like it's the TypeTree in the cast in
val Builder_this: NamedCodecPlatform.Builder[Any] =
Builder_this.asInstanceOf[NamedCodecPlatform.Builder[Any]]
which is unpositioned. /cc @nicolasstucki
I agree you should just find a way to ignore that. I've not seen .without("-Ycheck:all")
being used before, but I'm ok with it.
resolves: #18589