We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 818e36c commit 8b25ceaCopy full SHA for 8b25cea
compiler/src/dotty/tools/dotc/transform/init/Summarization.scala
@@ -316,8 +316,11 @@ object Summarization {
316
if env.canIgnoreClass(cls) then Effects.empty
317
else {
318
val ctor = cls.primaryConstructor
319
- Summarization.analyze(New(ref.tpe))(env.withOwner(ctor.owner))._2 +
320
- MethodCall(ThisRef()(ref), ctor)(ref)
+ val prefixEff =
+ if tref.prefix == NoPrefix then Effects.empty
321
+ else Summarization.analyze(New(ref.tpe))(env.withOwner(ctor.owner)).effs
322
+
323
+ prefixEff + MethodCall(ThisRef()(ref), ctor)(ref)
324
}
325
})
326
0 commit comments