summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/jvm/innerClassAttribute/Classes_1.scala2
-rw-r--r--test/files/jvm/innerClassAttribute/Test.scala2
-rw-r--r--test/files/pos/t3234.scala8
3 files changed, 6 insertions, 6 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..490128d5d2 100644
--- a/test/files/jvm/innerClassAttribute/Test.scala
+++ b/test/files/jvm/innerClassAttribute/Test.scala
@@ -340,7 +340,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)
diff --git a/test/files/pos/t3234.scala b/test/files/pos/t3234.scala
index c3b7366db8..8c588e5aa9 100644
--- a/test/files/pos/t3234.scala
+++ b/test/files/pos/t3234.scala
@@ -1,17 +1,17 @@
trait Trait1 {
- @inline def foo2(n: Int) = n*n
+ @inline final def foo2(n: Int) = n*n
}
trait Trait2 {
- @inline def foo3(n: Int) = 1
+ @inline final def foo3(n: Int) = 1
}
class Base extends Trait1 {
- @inline def foo(n: Int) = n
+ @inline final def foo(n: Int) = n
}
object Test extends Base with Trait2 {
def main(args: Array[String]) = {
println(foo(42) + foo2(11) + foo3(2))
}
-} \ No newline at end of file
+}