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 0a1fbfa commit 56d402eCopy full SHA for 56d402e
compiler/src/dotty/tools/dotc/transform/init/Summarization.scala
@@ -183,7 +183,13 @@ object Summarization {
183
// possible in try/catch/finally, see tests/crash/i6914.scala
184
Summary.empty
185
186
- case _: TypeDef | _ : DefDef =>
+ case ddef : DefDef =>
187
+ val (pots, effs) = analyze(ddef.rhs)
188
+
189
+ if (ddef.symbol.owner.isClass) Summary.empty
190
+ else (Potentials.empty, pots.leak(ddef) ++ effs)
191
192
+ case _: TypeDef =>
193
194
195
case _ =>
0 commit comments