@@ -20,7 +20,7 @@ import interface._
20
20
// Here used to be an `assert(!classSym.isDelambdafyFunction)`: delambdafy lambda classes are
21
21
// always top-level. However, SI-8900 shows an example where the weak name-based implementation
22
22
// of isDelambdafyFunction failed (for a function declared in a package named "lambda").
23
- classSym.isAnonymousClass || (classSym.originalOwner != NoSymbol && ! classSym.originalOwner .isClass)
23
+ classSym.isAnonymousClass || (classSym.originalLexicallyEnclosingClass != NoSymbol && ! classSym.originalLexicallyEnclosingClass .isClass)
24
24
}
25
25
26
26
/**
@@ -44,29 +44,29 @@ import interface._
44
44
* In this case, for B, we return None.
45
45
*
46
46
* The EnclosingMethod attribute needs to be added to non-member classes (see doc in BTypes).
47
- * This is a source-level property, so we need to use the originalOwner chain to reconstruct it.
47
+ * This is a source-level property, so we need to use the originalLexicallyEnclosingClass chain to reconstruct it.
48
48
*/
49
49
private def enclosingMethodForEnclosingMethodAttribute (classSym : Symbol ): Option [Symbol ] = {
50
50
assert(classSym.isClass, classSym)
51
51
def enclosingMethod (sym : Symbol ): Option [Symbol ] = {
52
52
if (sym.isClass || sym == NoSymbol ) None
53
53
else if (sym.isMethod) Some (sym)
54
- else enclosingMethod(sym.originalOwner )
54
+ else enclosingMethod(sym.originalLexicallyEnclosingClass )
55
55
}
56
- enclosingMethod(classSym.originalOwner )
56
+ enclosingMethod(classSym.originalLexicallyEnclosingClass )
57
57
}
58
58
59
59
/**
60
60
* The enclosing class for emitting the EnclosingMethod attribute. Since this is a source-level
61
- * property, this method looks at the originalOwner chain. See doc in BTypes.
61
+ * property, this method looks at the originalLexicallyEnclosingClass chain. See doc in BTypes.
62
62
*/
63
63
private def enclosingClassForEnclosingMethodAttribute (classSym : Symbol ): Symbol = {
64
64
assert(classSym.isClass, classSym)
65
65
def enclosingClass (sym : Symbol ): Symbol = {
66
66
if (sym.isClass) sym
67
- else enclosingClass(sym.originalOwner )
67
+ else enclosingClass(sym.originalLexicallyEnclosingClass )
68
68
}
69
- enclosingClass(classSym.originalOwner )
69
+ enclosingClass(classSym.originalLexicallyEnclosingClass )
70
70
}
71
71
72
72
/* final*/ case class EnclosingMethodEntry (owner : String , name : String , methodDescriptor : String )
0 commit comments