summaryrefslogtreecommitdiff
path: root/test/files/jvm/innerClassAttribute/Classes_1.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/jvm/innerClassAttribute/Classes_1.scala')
-rw-r--r--test/files/jvm/innerClassAttribute/Classes_1.scala37
1 files changed, 13 insertions, 24 deletions
diff --git a/test/files/jvm/innerClassAttribute/Classes_1.scala b/test/files/jvm/innerClassAttribute/Classes_1.scala
index 62c7d94d90..2b690bdd7b 100644
--- a/test/files/jvm/innerClassAttribute/Classes_1.scala
+++ b/test/files/jvm/innerClassAttribute/Classes_1.scala
@@ -187,41 +187,30 @@ trait A24 extends A24Base {
}
class SI_9105 {
- // the EnclosingMethod attributes depend on the delambdafy strategy (inline vs method)
-
- // outerClass-inline enclMeth-inline outerClass-method enclMeth-method
+ // outerClass enclMeth
val fun = (s: String) => {
- class A // closure null (*) SI_9105 null
- def m: Object = { class B; new B } // closure m$1 SI_9105 m$1
- val f: Object = { class C; new C } // closure null (*) SI_9105 null
+ class A // SI_9105 null
+ def m: Object = { class B; new B } // SI_9105 m$1
+ val f: Object = { class C; new C } // SI_9105 null
}
def met = (s: String) => {
- class D // closure null (*) SI_9105 met
- def m: Object = { class E; new E } // closure m$1 SI_9105 m$1
- val f: Object = { class F; new F } // closure null (*) SI_9105 met
+ class D // SI_9105 met
+ def m: Object = { class E; new E } // SI_9105 m$1
+ val f: Object = { class F; new F } // SI_9105 met
}
- // (*) the originalOwner chain of A (similar for D) is: SI_9105.fun.$anonfun-value.A
- // we can get to the anonfun-class (created by uncurry), but not to the apply method.
- //
- // for C and F, the originalOwner chain is fun.$anonfun-value.f.C. at later phases, the rawowner of f is
- // an apply$sp method of the closure class. we could use that as enclosing method, but it would be unsystematic
- // (A / D don't have an encl meth either), and also strange to use the $sp, which is a compilation artifact.
- // So using `null` looks more like the situation in the source code: C / F are nested classes of the anon-fun, and
- // there's no method in between.
-
def byName(op: => Any) = 0
val bnV = byName {
- class G // closure null (*) SI_9105 null
- def m: Object = { class H; new H } // closure m$1 SI_9105 m$1
- val f: Object = { class I; new I } // closure null (*) SI_9105 null
+ class G // SI_9105 null
+ def m: Object = { class H; new H } // SI_9105 m$1
+ val f: Object = { class I; new I } // SI_9105 null
""
}
def bnM = byName {
- class J // closure null (*) SI_9105 bnM
- def m: Object = { class K; new K } // closure m$1 SI_9105 m$1
- val f: Object = { class L; new L } // closure null (*) SI_9105 bnM
+ class J // SI_9105 bnM
+ def m: Object = { class K; new K } // SI_9105 m$1
+ val f: Object = { class L; new L } // SI_9105 bnM
""
}
}