We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 487e69d + dcd1ae7 commit 039f84eCopy full SHA for 039f84e
compiler/src/dotty/tools/dotc/transform/init/Summarization.scala
@@ -309,7 +309,7 @@ object Summarization {
309
if (cls == defn.AnyClass || cls == defn.AnyValClass) Effects.empty
310
else {
311
val ctor = cls.primaryConstructor
312
- Summarization.analyze(tref.prefix, ref)._2 +
+ Summarization.analyze(New(ref.tpe))(env.withOwner(ctor.owner))._2 +
313
MethodCall(ThisRef()(ref), ctor)(ref)
314
}
315
})
tests/init/crash/i9670.scala
@@ -0,0 +1,9 @@
1
+object Outer {
2
+ def foo = {
3
+ trait Mixin
4
+ class E extends Mixin
5
+ object SomeObject {
6
+ val A = E()
7
+ }
8
9
+}
0 commit comments