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 c679218 commit 261c87bCopy full SHA for 261c87b
src/dotty/tools/dotc/core/SymDenotations.scala
@@ -744,7 +744,8 @@ object SymDenotations {
744
final def enclosingMethod(implicit ctx: Context): Symbol =
745
if (this is (Method, butNot = Label)) symbol
746
else if (this.isClass) primaryConstructor
747
- else owner.enclosingMethod
+ else if (this.exists) owner.enclosingMethod
748
+ else NoSymbol
749
750
/** The top-level class containing this denotation,
751
* except for a toplevel module, where its module class is returned.
tests/pos/KillLambdaLift.scala
@@ -0,0 +1,3 @@
1
+class KillLambdaLift {
2
+ private def com: this.type = _root_.scala.Predef.???
3
+}
0 commit comments