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.
1 parent d90dce2 commit 2334a0dCopy full SHA for 2334a0d
compiler/src/dotty/tools/dotc/transform/init/Summarization.scala
@@ -338,8 +338,11 @@ object Summarization {
338
if (cls == defn.AnyClass || cls == defn.AnyValClass) Effects.empty
339
else {
340
val ctor = cls.primaryConstructor
341
- Summarization.analyze(New(ref.tpe))(env.withOwner(ctor.owner))._2 +
342
- MethodCall(ThisRef()(ref), ctor)(ref)
+ val prefixEff =
+ if tref.prefix == NoPrefix then Effects.empty
343
+ else Summarization.analyze(New(ref.tpe))(env.withOwner(ctor.owner)).effs
344
+
345
+ prefixEff + MethodCall(ThisRef()(ref), ctor)(ref)
346
}
347
})
348
0 commit comments