diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-20 20:03:16 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2016-03-20 20:03:16 -0700 |
commit | 06485eb4d9a41dd99086c204fa76089395f01d61 (patch) | |
tree | 8ef922ac2ff29e0f765526ce63ee1d41b56d4305 /test/files/jvm/innerClassAttribute | |
parent | 99a82be91cbb85239f70508f6695c6b21fd3558c (diff) | |
parent | 41d5b9f33fc21c993c676c0389e5f4e7dc66166c (diff) | |
download | scala-06485eb4d9a41dd99086c204fa76089395f01d61.tar.gz scala-06485eb4d9a41dd99086c204fa76089395f01d61.tar.bz2 scala-06485eb4d9a41dd99086c204fa76089395f01d61.zip |
Merge pull request #5003 from retronym/topic/nuke-impl-classes-sans-fields
New trait encoding using default methods
Diffstat (limited to 'test/files/jvm/innerClassAttribute')
-rw-r--r-- | test/files/jvm/innerClassAttribute/Classes_1.scala | 2 | ||||
-rw-r--r-- | test/files/jvm/innerClassAttribute/Test.scala | 19 |
2 files changed, 4 insertions, 17 deletions
diff --git a/test/files/jvm/innerClassAttribute/Classes_1.scala b/test/files/jvm/innerClassAttribute/Classes_1.scala index 5b821d43f8..0abed140f1 100644 --- a/test/files/jvm/innerClassAttribute/Classes_1.scala +++ b/test/files/jvm/innerClassAttribute/Classes_1.scala @@ -222,7 +222,7 @@ trait SI_9124 { def f = new A { def f2 = 0 } // enclosing method is f in the interface SI_9124 - private def g = new A { def f3 = 0 } // only encl class (SI_9124), encl meth is null because the interface SI_9124 doesn't have a method g + private def g: Object = new A { def f3 = 0 } // only encl class (SI_9124), encl meth can be g in 2.12 because the interface SI_9124 now has the method g object O { // member, no encl meth attribute new A { def f4 = 0 } // enclosing class is O$, no enclosing method diff --git a/test/files/jvm/innerClassAttribute/Test.scala b/test/files/jvm/innerClassAttribute/Test.scala index 903d08f72d..1ac5a2dcf6 100644 --- a/test/files/jvm/innerClassAttribute/Test.scala +++ b/test/files/jvm/innerClassAttribute/Test.scala @@ -125,7 +125,6 @@ object Test extends BytecodeTest { def testA6() = { val List(tt1) = innerClassNodes("A6") assertMember(tt1, "A6", "TT", flags = publicAbstractInterface) - val List() = innerClassNodes("A6$class") val List(tt2) = innerClassNodes("A6$TT") assertMember(tt2, "A6", "TT", flags = publicAbstractInterface) } @@ -340,7 +339,7 @@ object Test extends BytecodeTest { assertNoEnclosingMethod("SI_9124$A") assertEnclosingMethod(classes("f1"), "SI_9124", null, null) assertEnclosingMethod(classes("f2"), "SI_9124", "f", "()LSI_9124$A;") - assertEnclosingMethod(classes("f3"), "SI_9124", null, null) + assertEnclosingMethod(classes("f3"), "SI_9124", "g", "()Ljava/lang/Object;") assertEnclosingMethod(classes("f4"), "SI_9124$O$", null, null) assertEnclosingMethod(classes("f5"), "SI_9124", null, null) assertEnclosingMethod(classes("f6"), "SI_9124", null, null) @@ -351,25 +350,19 @@ object Test extends BytecodeTest { assertMember(ownInnerClassNode("SI_9124$O$"), "SI_9124", "O$") } + // Note: the new trait encoding removed impl classes, so this test name doesn't make sense. + // But I've left it here as there were some tests remaining that are still relevant. def testImplClassesTopLevel() { val classes = List( "ImplClassesAreTopLevel$$anon$14", "ImplClassesAreTopLevel$$anon$15", "ImplClassesAreTopLevel$$anon$16", - "ImplClassesAreTopLevel$B1$class", "ImplClassesAreTopLevel$B1", - "ImplClassesAreTopLevel$B2$1$class", "ImplClassesAreTopLevel$B2$1", - "ImplClassesAreTopLevel$B3$1$class", "ImplClassesAreTopLevel$B3$1", - "ImplClassesAreTopLevel$B4$class", "ImplClassesAreTopLevel$B4$1", - "ImplClassesAreTopLevel$class", "ImplClassesAreTopLevel") - classes.filter(_.endsWith("$class")).foreach(assertNoEnclosingMethod) - classes.flatMap(innerClassNodes).foreach(icn => assert(!icn.name.endsWith("$class"), icn)) - assertNoEnclosingMethod("ImplClassesAreTopLevel$B1") // member, no encl meth attr // no encl meth, but encl class @@ -391,17 +384,11 @@ object Test extends BytecodeTest { testInner("ImplClassesAreTopLevel$$anon$15", an15, b2) testInner("ImplClassesAreTopLevel$$anon$16", an16, b4) - testInner("ImplClassesAreTopLevel$B1$class", b1) - testInner("ImplClassesAreTopLevel$B2$1$class", b2) - testInner("ImplClassesAreTopLevel$B3$1$class", b3) - testInner("ImplClassesAreTopLevel$B4$class", b4) - testInner("ImplClassesAreTopLevel$B1", b1) testInner("ImplClassesAreTopLevel$B2$1", b2) testInner("ImplClassesAreTopLevel$B3$1", b3) testInner("ImplClassesAreTopLevel$B4$1", b4) - testInner("ImplClassesAreTopLevel$class", an14, an15, an16) testInner("ImplClassesAreTopLevel", an14, an15, an16, b1, b2, b3, b4) } |