From 55990c9ec619cf212a31db4f818dedb5d3150157 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 14 Mar 2012 10:25:59 -0700 Subject: New starr to support new fundamental laws of reality. And grueling recovery from branch drift. Merges a portion (and only a portion) of topic/inline into master. The major changes which come with this merge are: AnyVal is unsealed, can be extended directly. ScalaObject is no longer with us. --- test/files/codelib/code.jar.desired.sha1 | 2 +- test/files/neg/anyval-children-2.check | 2 +- test/files/neg/t5529.check | 4 +-- test/files/presentation/callcc-interpreter.check | 4 +-- test/files/run/existentials3.check | 44 ++++++++++++------------ test/files/run/programmatic-main.check | 37 ++++++++++---------- test/files/run/reify_ann1a.check | 4 +-- test/files/run/reify_ann1b.check | 4 +-- test/files/run/reify_classfileann_a.check | 4 +-- test/files/run/t1195.check | 12 +++---- test/files/run/t5224.check | 2 +- test/files/run/t5271_1.check | 2 +- test/files/run/t5271_2.check | 2 +- test/files/run/t5271_3.check | 4 +-- test/files/run/t5527.check | 14 ++++---- test/files/specialized/SI-5005.check | 4 +-- 16 files changed, 71 insertions(+), 74 deletions(-) (limited to 'test') diff --git a/test/files/codelib/code.jar.desired.sha1 b/test/files/codelib/code.jar.desired.sha1 index dbf19cafd7..8dabf404b9 100644 --- a/test/files/codelib/code.jar.desired.sha1 +++ b/test/files/codelib/code.jar.desired.sha1 @@ -1 +1 @@ -e25f1daf9010b9dc6038ae7069fc9d0f7d48a53b ?code.jar +e76a8883d275ca4870f745b505fb0a1cb9cbe446 ?code.jar diff --git a/test/files/neg/anyval-children-2.check b/test/files/neg/anyval-children-2.check index cb327faeeb..a88682ea93 100644 --- a/test/files/neg/anyval-children-2.check +++ b/test/files/neg/anyval-children-2.check @@ -1,4 +1,4 @@ -anyval-children-2.scala:1: error: Only @inline classes (not traits) are allowed to extend AnyVal +anyval-children-2.scala:1: error: Only classes (not traits) are allowed to extend AnyVal @inline trait NotOkDingus1 extends AnyVal // fail ^ one error found diff --git a/test/files/neg/t5529.check b/test/files/neg/t5529.check index 78a26aeb50..5d2175fa79 100644 --- a/test/files/neg/t5529.check +++ b/test/files/neg/t5529.check @@ -4,9 +4,7 @@ t5529.scala:12: error: File is already defined as class File t5529.scala:10: error: class type required but test.Test.File found sealed class Dir extends File { } ^ -t5529.scala:10: error: illegal inheritance; super - is not a subclass of the superclass Object - of the mixin trait ScalaObject +t5529.scala:10: error: test.Test.File does not have a constructor sealed class Dir extends File { } ^ three errors found diff --git a/test/files/presentation/callcc-interpreter.check b/test/files/presentation/callcc-interpreter.check index 41b07b07dc..3385ef12b7 100644 --- a/test/files/presentation/callcc-interpreter.check +++ b/test/files/presentation/callcc-interpreter.check @@ -20,7 +20,7 @@ retrieved 64 members `method ->[B](y: B)(callccInterpreter.type, B)` `method ==(x$1: Any)Boolean` `method ==(x$1: AnyRef)Boolean` -`method add(a: callccInterpreter.Value, b: callccInterpreter.Value)callccInterpreter.M[_ >: callccInterpreter.Num with callccInterpreter.Wrong.type <: Serializable with Product with callccInterpreter.Value]` +`method add(a: callccInterpreter.Value, b: callccInterpreter.Value)callccInterpreter.M[_ >: callccInterpreter.Num with callccInterpreter.Wrong.type <: Product with Serializable with callccInterpreter.Value]` `method apply(a: callccInterpreter.Value, b: callccInterpreter.Value)callccInterpreter.M[callccInterpreter.Value]` `method asInstanceOf[T0]=> T0` `method callCC[A](h: (A => callccInterpreter.M[A]) => callccInterpreter.M[A])callccInterpreter.M[A]` @@ -87,7 +87,7 @@ def showM(m: callccInterpreter.M[callccInterpreter.Value]): String = m.in.apply( askType at CallccInterpreter.scala(50,30) ================================================================================ [response] askTypeAt at (50,30) -def add(a: callccInterpreter.Value, b: callccInterpreter.Value): callccInterpreter.M[_ >: callccInterpreter.Num with callccInterpreter.Wrong.type <: Serializable with Product with callccInterpreter.Value] = scala.this.Predef.Pair.apply[callccInterpreter.Value, callccInterpreter.Value](a, b) match { +def add(a: callccInterpreter.Value, b: callccInterpreter.Value): callccInterpreter.M[_ >: callccInterpreter.Num with callccInterpreter.Wrong.type <: Product with Serializable with callccInterpreter.Value] = scala.this.Predef.Pair.apply[callccInterpreter.Value, callccInterpreter.Value](a, b) match { case scala.this.Predef.Pair.unapply[callccInterpreter.Value, callccInterpreter.Value]() ((n: Int)callccInterpreter.Num((m @ _)), (n: Int)callccInterpreter.Num((n @ _))) => this.unitM[callccInterpreter.Num](callccInterpreter.this.Num.apply(m.+(n))) case _ => callccInterpreter.this.unitM[callccInterpreter.Wrong.type](callccInterpreter.this.Wrong) } diff --git a/test/files/run/existentials3.check b/test/files/run/existentials3.check index 41dc1f767c..8559540f80 100644 --- a/test/files/run/existentials3.check +++ b/test/files/run/existentials3.check @@ -1,22 +1,22 @@ -_ <: scala.runtime.AbstractFunction0[_ <: Object with Test$ToS with scala.ScalaObject with scala.Product with scala.Serializable] with scala.ScalaObject with scala.Serializable with java.lang.Object -_ <: Object with Test$ToS with scala.ScalaObject with scala.Product with scala.Serializable -Object with Test$ToS with scala.ScalaObject -Object with Test$ToS with scala.ScalaObject -Object with Test$ToS with scala.ScalaObject -scala.Function0[Object with Test$ToS with scala.ScalaObject] -scala.Function0[Object with Test$ToS with scala.ScalaObject] -_ <: Object with _ <: Object with Object with Test$ToS with scala.ScalaObject -_ <: Object with _ <: Object with _ <: Object with Test$ToS with scala.ScalaObject -scala.collection.immutable.List[Object with scala.collection.Seq[Int] with scala.ScalaObject] -scala.collection.immutable.List[Object with scala.collection.Seq[_ <: Int] with scala.ScalaObject] -_ <: scala.runtime.AbstractFunction0[_ <: Object with Test$ToS with scala.ScalaObject with scala.Product with scala.Serializable] with scala.ScalaObject with scala.Serializable with java.lang.Object -_ <: Object with Test$ToS with scala.ScalaObject with scala.Product with scala.Serializable -Object with Test$ToS with scala.ScalaObject -Object with Test$ToS with scala.ScalaObject -Object with Test$ToS with scala.ScalaObject -scala.Function0[Object with Test$ToS with scala.ScalaObject] -scala.Function0[Object with Test$ToS with scala.ScalaObject] -_ <: Object with _ <: Object with Object with Test$ToS with scala.ScalaObject -_ <: Object with _ <: Object with _ <: Object with Test$ToS with scala.ScalaObject -scala.collection.immutable.List[Object with scala.collection.Seq[Int] with scala.ScalaObject] -scala.collection.immutable.List[Object with scala.collection.Seq[_ <: Int] with scala.ScalaObject] +_ <: scala.runtime.AbstractFunction0[_ <: Object with Test$ToS with scala.Product with scala.Serializable with Object] with scala.Serializable with java.lang.Object +_ <: Object with Test$ToS with scala.Product with scala.Serializable with Object +Object with Test$ToS +Object with Test$ToS with Object +Object with Test$ToS +scala.Function0[Object with Test$ToS] +scala.Function0[Object with Test$ToS] +_ <: Object with _ <: Object with Object with Test$ToS with Object with Object +_ <: Object with _ <: Object with _ <: Object with Test$ToS with Object with Object +scala.collection.immutable.List[Object with scala.collection.Seq[Int] with Object] +scala.collection.immutable.List[Object with scala.collection.Seq[_ <: Int] with Object] +_ <: scala.runtime.AbstractFunction0[_ <: Object with Test$ToS with scala.Product with scala.Serializable with Object] with scala.Serializable with java.lang.Object +_ <: Object with Test$ToS with scala.Product with scala.Serializable with Object +Object with Test$ToS +Object with Test$ToS with Object +Object with Test$ToS +scala.Function0[Object with Test$ToS] +scala.Function0[Object with Test$ToS] +_ <: Object with _ <: Object with Object with Test$ToS with Object with Object +_ <: Object with _ <: Object with _ <: Object with Test$ToS with Object with Object +scala.collection.immutable.List[Object with scala.collection.Seq[Int] with Object] +scala.collection.immutable.List[Object with scala.collection.Seq[_ <: Int] with Object] diff --git a/test/files/run/programmatic-main.check b/test/files/run/programmatic-main.check index a24de79b8a..b5a54f5ea7 100644 --- a/test/files/run/programmatic-main.check +++ b/test/files/run/programmatic-main.check @@ -8,23 +8,22 @@ superaccessors 6 add super accessors in traits and nested classes pickler 7 serialize symbol tables refchecks 8 reference/override checking, translate nested objects - liftcode 9 reify trees - uncurry 10 uncurry, translate function values to anonymous classes - tailcalls 11 replace tail calls by jumps - specialize 12 @specialized-driven class and method specialization - explicitouter 13 this refs to outer pointers, translate patterns - erasure 14 erase types, add interfaces for traits - lazyvals 15 allocate bitmaps, translate lazy vals into lazified defs - lambdalift 16 move nested functions to top level - constructors 17 move field definitions into constructors - flatten 18 eliminate inner classes - mixin 19 mixin composition - cleanup 20 platform-specific cleanups, generate reflective calls - icode 21 generate portable intermediate code - inliner 22 optimization: do inlining -inlineExceptionHandlers 23 optimization: inline exception handlers - closelim 24 optimization: eliminate uncalled closures - dce 25 optimization: eliminate dead code - jvm 26 generate JVM bytecode - terminal 27 The last phase in the compiler chain + uncurry 9 uncurry, translate function values to anonymous classes + tailcalls 10 replace tail calls by jumps + specialize 11 @specialized-driven class and method specialization + explicitouter 12 this refs to outer pointers, translate patterns + erasure 13 erase types, add interfaces for traits + lazyvals 14 allocate bitmaps, translate lazy vals into lazified defs + lambdalift 15 move nested functions to top level + constructors 16 move field definitions into constructors + flatten 17 eliminate inner classes + mixin 18 mixin composition + cleanup 19 platform-specific cleanups, generate reflective calls + icode 20 generate portable intermediate code + inliner 21 optimization: do inlining +inlineExceptionHandlers 22 optimization: inline exception handlers + closelim 23 optimization: eliminate uncalled closures + dce 24 optimization: eliminate dead code + jvm 25 generate JVM bytecode + terminal 26 The last phase in the compiler chain diff --git a/test/files/run/reify_ann1a.check b/test/files/run/reify_ann1a.check index 2822238706..97d4848a49 100644 --- a/test/files/run/reify_ann1a.check +++ b/test/files/run/reify_ann1a.check @@ -1,5 +1,5 @@ { - @new ann(immutable.this.List.apply[String]("1a")) @new ann(immutable.this.List.apply[String]("1b")) class C[@new ann(immutable.this.List.apply[String]("2a")) @new ann(immutable.this.List.apply[String]("2b")) T>: Nothing <: Any] extends Object with ScalaObject { + @new ann(immutable.this.List.apply[String]("1a")) @new ann(immutable.this.List.apply[String]("1b")) class C[@new ann(immutable.this.List.apply[String]("2a")) @new ann(immutable.this.List.apply[String]("2b")) T>: Nothing <: Any] extends scala.AnyRef { @new ann(immutable.this.List.apply[String]("3a")) @new ann(immutable.this.List.apply[String]("3b")) private[this] val x: T @ann(immutable.this.List.apply[String]("4a")) @ann(immutable.this.List.apply[String]("4b")) = _; def (@new ann(immutable.this.List.apply[String]("3a")) @new ann(immutable.this.List.apply[String]("3b")) x: T @ann(immutable.this.List.apply[String]("4a")) @ann(immutable.this.List.apply[String]("4b"))) = { super.(); @@ -14,7 +14,7 @@ () } { - @ann(immutable.this.List.apply[String]("1a")) @ann(immutable.this.List.apply[String]("1b")) class C[@ann(immutable.this.List.apply[String]("2a")) @ann(immutable.this.List.apply[String]("2b")) T>: Nothing <: Any] extends Object with ScalaObject { + @ann(immutable.this.List.apply[String]("1a")) @ann(immutable.this.List.apply[String]("1b")) class C[@ann(immutable.this.List.apply[String]("2a")) @ann(immutable.this.List.apply[String]("2b")) T>: Nothing <: Any] extends scala.AnyRef { @ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) private[this] val x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a")) = _; def (@ann(immutable.this.List.apply[String]("3a")) @ann(immutable.this.List.apply[String]("3b")) x: T @ann(immutable.this.List.apply[String]("4b")) @ann(immutable.this.List.apply[String]("4a"))): C[T] = { C.super.(); diff --git a/test/files/run/reify_ann1b.check b/test/files/run/reify_ann1b.check index e240e1e0ce..ceebc0e2ed 100644 --- a/test/files/run/reify_ann1b.check +++ b/test/files/run/reify_ann1b.check @@ -1,5 +1,5 @@ { - @new ann(bar = "1a") @new ann(bar = "1b") class C[@new ann(bar = "2a") @new ann(bar = "2b") T>: Nothing <: Any] extends Object with ScalaObject { + @new ann(bar = "1a") @new ann(bar = "1b") class C[@new ann(bar = "2a") @new ann(bar = "2b") T>: Nothing <: Any] extends scala.AnyRef { @new ann(bar = "3a") @new ann(bar = "3b") private[this] val x: T @ann(bar = "4a") @ann(bar = "4b") = _; def (@new ann(bar = "3a") @new ann(bar = "3b") x: T @ann(bar = "4a") @ann(bar = "4b")) = { super.(); @@ -14,7 +14,7 @@ () } { - @ann(bar = "1a") @ann(bar = "1b") class C[@ann(bar = "2a") @ann(bar = "2b") T>: Nothing <: Any] extends Object with ScalaObject { + @ann(bar = "1a") @ann(bar = "1b") class C[@ann(bar = "2a") @ann(bar = "2b") T>: Nothing <: Any] extends scala.AnyRef { @ann(bar = "3a") @ann(bar = "3b") private[this] val x: T @ann(bar = "4b") @ann(bar = "4a") = _; def (@ann(bar = "3a") @ann(bar = "3b") x: T @ann(bar = "4b") @ann(bar = "4a")): C[T] = { C.super.(); diff --git a/test/files/run/reify_classfileann_a.check b/test/files/run/reify_classfileann_a.check index 1773263a94..419d916907 100644 --- a/test/files/run/reify_classfileann_a.check +++ b/test/files/run/reify_classfileann_a.check @@ -1,5 +1,5 @@ { - @new ann(bar = "1", quux = Array("2", "3"), baz = new ann(bar = "4")) class C extends Object with ScalaObject { + @new ann(bar = "1", quux = Array("2", "3"), baz = new ann(bar = "4")) class C extends scala.AnyRef { def () = { super.(); () @@ -8,7 +8,7 @@ () } { - @ann(bar = "1", quux = ["2", "3"], baz = ann(bar = "4")) class C extends Object with ScalaObject { + @ann(bar = "1", quux = ["2", "3"], baz = ann(bar = "4")) class C extends scala.AnyRef { def (): C = { C.super.(); () diff --git a/test/files/run/t1195.check b/test/files/run/t1195.check index dc521fb8ca..1214d0c4b5 100644 --- a/test/files/run/t1195.check +++ b/test/files/run/t1195.check @@ -1,6 +1,6 @@ -_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.ScalaObject with scala.Product with scala.Serializable] with scala.ScalaObject with scala.Serializable with java.lang.Object -_ <: Object with scala.ScalaObject with scala.Product with scala.Serializable -Object with scala.ScalaObject with scala.Product with scala.Serializable -_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.ScalaObject with scala.Product with scala.Serializable] with scala.ScalaObject with scala.Serializable with java.lang.Object -_ <: Object with scala.ScalaObject with scala.Product with scala.Serializable -Object with scala.ScalaObject with scala.Product with scala.Serializable +_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable with Object] with scala.Serializable with java.lang.Object +_ <: Object with scala.Product with scala.Serializable with Object +Object with scala.Product with scala.Serializable +_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable with Object] with scala.Serializable with java.lang.Object +_ <: Object with scala.Product with scala.Serializable with Object +Object with scala.Product with scala.Serializable diff --git a/test/files/run/t5224.check b/test/files/run/t5224.check index 5bead91b36..28bc75d4fd 100644 --- a/test/files/run/t5224.check +++ b/test/files/run/t5224.check @@ -1,5 +1,5 @@ { - @new Foo(bar = "qwe") class C extends Object with ScalaObject { + @new Foo(bar = "qwe") class C extends scala.AnyRef { def () = { super.(); () diff --git a/test/files/run/t5271_1.check b/test/files/run/t5271_1.check index d4fd544e88..9b956da17a 100644 --- a/test/files/run/t5271_1.check +++ b/test/files/run/t5271_1.check @@ -1,5 +1,5 @@ { - case class C extends Object with ScalaObject with Product with Serializable { + case class C extends Object with Product with Serializable { val foo : Int = _; val bar : Int = _; def (foo: Int, bar: Int) = { diff --git a/test/files/run/t5271_2.check b/test/files/run/t5271_2.check index 5a519f265f..27297febb6 100644 --- a/test/files/run/t5271_2.check +++ b/test/files/run/t5271_2.check @@ -1,5 +1,5 @@ { - case class C extends Object with ScalaObject with Product with Serializable { + case class C extends Object with Product with Serializable { val foo : Int = _; val bar : Int = _; def (foo: Int, bar: Int) = { diff --git a/test/files/run/t5271_3.check b/test/files/run/t5271_3.check index be87696f02..9331c78959 100644 --- a/test/files/run/t5271_3.check +++ b/test/files/run/t5271_3.check @@ -1,12 +1,12 @@ { - object C extends Object with ScalaObject with Serializable { + object C extends scala.AnyRef with Serializable { def () = { super.(); () }; def qwe: Int = 4 }; - case class C extends Object with ScalaObject with Product with Serializable { + case class C extends Object with Product with Serializable { val foo : Int = _; val bar : Int = _; def (foo: Int, bar: Int) = { diff --git a/test/files/run/t5527.check b/test/files/run/t5527.check index 4a8a9ce602..bb13928fd8 100644 --- a/test/files/run/t5527.check +++ b/test/files/run/t5527.check @@ -1,13 +1,13 @@ [[syntax trees at end of parser]]// Scala source: newSource1 package { - object UselessComments extends scala.ScalaObject { + object UselessComments extends scala.AnyRef { def () = { super.(); () }; var z = 0; def test1 = { - object Maybe extends scala.ScalaObject { + object Maybe extends scala.AnyRef { def () = { super.(); () @@ -42,13 +42,13 @@ package { } }; /** comments that we should keep */ - object UsefulComments extends scala.ScalaObject { + object UsefulComments extends scala.AnyRef { def () = { super.(); () }; /** class A */ - class A extends scala.ScalaObject { + class A extends scala.AnyRef { def () = { super.(); () @@ -61,7 +61,7 @@ package { var u = 2 }; /** trait B */ - abstract trait B extends scala.ScalaObject { + abstract trait B extends scala.AnyRef { def $init$() = { () }; @@ -75,7 +75,7 @@ package { var u = 2 }; /** object C */ - object C extends scala.ScalaObject { + object C extends scala.AnyRef { def () = { super.(); () @@ -88,7 +88,7 @@ package { var u = 2 }; /** class D */ - @new deprecated("use ... instead", "2.10.0") class D extends scala.ScalaObject { + @new deprecated("use ... instead", "2.10.0") class D extends scala.AnyRef { def () = { super.(); () diff --git a/test/files/specialized/SI-5005.check b/test/files/specialized/SI-5005.check index d2a97512ae..9fc63a2b1d 100644 --- a/test/files/specialized/SI-5005.check +++ b/test/files/specialized/SI-5005.check @@ -1,6 +1,6 @@ [[syntax trees at end of specialize]]// Scala source: newSource1 package { - class C2[@specialized(scala.Boolean) U >: Nothing <: Any] extends Object with ScalaObject { + class C2[@specialized(scala.Boolean) U >: Nothing <: Any] extends Object { def (): C2[U] = { C2.super.(); () @@ -8,7 +8,7 @@ package { def apply(x: U): U = x; def apply$mcZ$sp(x: Boolean): Boolean = C2.this.apply(x.asInstanceOf[U]()).asInstanceOf[Boolean]() }; - class B extends Object with ScalaObject { + class B extends Object { def (): B = { B.super.(); () -- cgit v1.2.3