diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-07-29 22:14:59 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-07-29 22:14:59 -0700 |
commit | 8eb2853e19e03532c61963c87f3bf9f09cba5413 (patch) | |
tree | 9039f4b1bce71fa1b5a5ed721d0ee27d0751c015 /test | |
parent | a72f79abf5845d25c847f7d7cde6d28a9d15612e (diff) | |
parent | 59e21f37cb80215ada0db60363fb9f30adf6a0cd (diff) | |
download | scala-8eb2853e19e03532c61963c87f3bf9f09cba5413.tar.gz scala-8eb2853e19e03532c61963c87f3bf9f09cba5413.tar.bz2 scala-8eb2853e19e03532c61963c87f3bf9f09cba5413.zip |
Merge remote-tracking branch 'scala/master' into merge-2.10.x
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm/manifests-new.check | 4 | ||||
-rw-r--r-- | test/files/neg/macro-override-macro-overrides-abstract-method-b.check | 4 | ||||
-rw-r--r-- | test/files/neg/names-defaults-neg-ref.check | 2 | ||||
-rw-r--r-- | test/files/neg/t0764.check | 1 | ||||
-rw-r--r-- | test/files/neg/t1112.check | 2 | ||||
-rw-r--r-- | test/files/neg/t1432.check | 8 | ||||
-rw-r--r-- | test/files/neg/t1432.scala | 4 | ||||
-rw-r--r-- | test/files/neg/t6231.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6260.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6666.check | 16 | ||||
-rw-r--r-- | test/files/neg/t6666c.check | 2 | ||||
-rw-r--r-- | test/files/neg/t6666e.check | 2 | ||||
-rw-r--r-- | test/files/run/existentials3-new.check | 12 | ||||
-rw-r--r-- | test/files/run/macro-term-declared-in-trait.check | 2 | ||||
-rw-r--r-- | test/files/run/t5256g.check | 6 | ||||
-rw-r--r-- | test/files/run/t5256h.check | 2 | ||||
-rw-r--r-- | test/files/run/t6028.check | 8 | ||||
-rw-r--r-- | test/files/run/t6555.check | 4 | ||||
-rw-r--r-- | test/files/run/toolbox_typecheck_macrosdisabled.check | 2 | ||||
-rw-r--r-- | test/files/run/toolbox_typecheck_macrosdisabled2.check | 2 |
20 files changed, 49 insertions, 42 deletions
diff --git a/test/files/jvm/manifests-new.check b/test/files/jvm/manifests-new.check index a1ff9491cf..7b229ba679 100644 --- a/test/files/jvm/manifests-new.check +++ b/test/files/jvm/manifests-new.check @@ -31,8 +31,8 @@ x=Foo, t=TypeTag[Foo[List[Int]]], k=TypeRef, s=class Foo x=Foo, t=TypeTag[Foo[Foo[Int]]], k=TypeRef, s=class Foo x=Foo, t=TypeTag[Foo[List[Foo[Int]]]], k=TypeRef, s=class Foo -x=Test1$$anon$1, t=TypeTag[Bar[String]], k=RefinedType, s=<local Test1> -x=Test1$$anon$2, t=TypeTag[Bar[String]], k=RefinedType, s=<local Test1> +x=Test1$$anon$1, t=TypeTag[Bar[String]], k=RefinedType, s=<refinement of Bar[String]> +x=Test1$$anon$2, t=TypeTag[Bar[String]], k=RefinedType, s=<refinement of Bar[String]> ()=() true=true diff --git a/test/files/neg/macro-override-macro-overrides-abstract-method-b.check b/test/files/neg/macro-override-macro-overrides-abstract-method-b.check index c49918c0b7..c733555549 100644 --- a/test/files/neg/macro-override-macro-overrides-abstract-method-b.check +++ b/test/files/neg/macro-override-macro-overrides-abstract-method-b.check @@ -1,7 +1,7 @@ -Test_2.scala:3: error: anonymous class $anon inherits conflicting members: +Test_2.scala:3: error: <$anon: C with A> inherits conflicting members: macro method t in trait C of type ()Unit and method t in trait A of type ()Unit -(Note: this can be resolved by declaring an override in anonymous class $anon.) +(Note: this can be resolved by declaring an override in <$anon: C with A>.) val c2 = new C with A {} ^ Test_2.scala:5: error: overriding macro method t in trait C of type ()Unit; diff --git a/test/files/neg/names-defaults-neg-ref.check b/test/files/neg/names-defaults-neg-ref.check index 00052c72dc..61d66fd32a 100644 --- a/test/files/neg/names-defaults-neg-ref.check +++ b/test/files/neg/names-defaults-neg-ref.check @@ -1,4 +1,4 @@ -names-defaults-neg-ref.scala:3: error: in anonymous class $anon, multiple overloaded alternatives of method f define default arguments. +names-defaults-neg-ref.scala:3: error: in <$anon: A2235 with B2235>, multiple overloaded alternatives of method f define default arguments. The members with defaults are defined in trait B2235 and trait A2235. new A2235 with B2235 ^ diff --git a/test/files/neg/t0764.check b/test/files/neg/t0764.check index e14c7705b8..6156b52712 100644 --- a/test/files/neg/t0764.check +++ b/test/files/neg/t0764.check @@ -1,6 +1,7 @@ t0764.scala:13: error: type mismatch; found : Node{type T = _1.type} where val _1: Node{type T = NextType} required: Node{type T = Main.this.AType} + (which expands to) Node{type T = Node{type T = NextType}} new Main[AType]( (value: AType).prepend ) ^ one error found diff --git a/test/files/neg/t1112.check b/test/files/neg/t1112.check index e69be3ef2c..5e3821b153 100644 --- a/test/files/neg/t1112.check +++ b/test/files/neg/t1112.check @@ -1,4 +1,4 @@ -t1112.scala:12: error: too many arguments for method call: (p: Int)(f: => () => Unit)Unit +t1112.scala:12: error: too many arguments for method call: (p: Int)(f: => Test.this.Type1)Unit call(0,() => System.out.println("here we are")) ^ one error found diff --git a/test/files/neg/t1432.check b/test/files/neg/t1432.check index 180cb05e67..e41f3453fe 100644 --- a/test/files/neg/t1432.check +++ b/test/files/neg/t1432.check @@ -1,6 +1,8 @@ -t1432.scala:10: error: type mismatch; - found : (Int, Bug_NoUnique.Wrap[Bug_NoUnique.Wrap[Unit]] => Double) - required: (Int, Unit => Double) +t1432.scala:12: error: type mismatch; + found : (Int, Bug_NoUnique.Alias2[Bug_NoUnique.Wrap[Unit]] => Double) + (which expands to) (Int, Bug_NoUnique.Wrap[Bug_NoUnique.Wrap[Unit]] => Double) + required: Bug_NoUnique.TypeCon[Unit] + (which expands to) (Int, Unit => Double) def test(x : TypeCon[Wrap[Unit]]) : TypeCon[Unit] = wrap(x) ^ one error found diff --git a/test/files/neg/t1432.scala b/test/files/neg/t1432.scala index 638f36554f..bdf2331280 100644 --- a/test/files/neg/t1432.scala +++ b/test/files/neg/t1432.scala @@ -4,7 +4,9 @@ object Bug_NoUnique { case class Wrap[E](parent:E) {} - def wrap[E,A,Y](v : (A,E=>Y)) : (A,Wrap[E]=>Y) = + type Alias2[E] = Wrap[E] + + def wrap[E,A,Y](v : (A,E=>Y)) : (A,Alias2[E]=>Y) = throw new Error("Body here") def test(x : TypeCon[Wrap[Unit]]) : TypeCon[Unit] = wrap(x) diff --git a/test/files/neg/t6231.check b/test/files/neg/t6231.check index b27961d393..2428bf66d0 100644 --- a/test/files/neg/t6231.check +++ b/test/files/neg/t6231.check @@ -1,6 +1,6 @@ t6231.scala:4: error: Implementation restriction: local trait Bug$X$1 is unable to automatically capture the -free variable value ev$1 on behalf of anonymous class anonfun$qux$1. You can manually assign it to a val inside the trait, -and refer that that val in anonymous class anonfun$qux$1. For more details, see SI-6231. +free variable value ev$1 on behalf of <$anon: Function0>. You can manually assign it to a val inside the trait, +and refer that that val in <$anon: Function0>. For more details, see SI-6231. def qux = { () => ev } ^ one error found diff --git a/test/files/neg/t6260.check b/test/files/neg/t6260.check index 46e9bd1dfc..60c4add143 100644 --- a/test/files/neg/t6260.check +++ b/test/files/neg/t6260.check @@ -1,10 +1,10 @@ -t6260.scala:3: error: bridge generated for member method apply: (bx: Box[X])Box[Y] in anonymous class $anonfun +t6260.scala:3: error: bridge generated for member method apply: (bx: Box[X])Box[Y] in <$anon: Box[X] => Box[Y]> which overrides method apply: (v1: T1)R in trait Function1 clashes with definition of the member itself; both have erased type (v1: Object)Object ((bx: Box[X]) => new Box(f(bx.x)))(this) ^ -t6260.scala:8: error: bridge generated for member method apply: (bx: Box[X])Box[Y] in anonymous class $anonfun +t6260.scala:8: error: bridge generated for member method apply: (bx: Box[X])Box[Y] in <$anon: Box[X] => Box[Y]> which overrides method apply: (v1: T1)R in trait Function1 clashes with definition of the member itself; both have erased type (v1: Object)Object diff --git a/test/files/neg/t6666.check b/test/files/neg/t6666.check index 6337d4c7d9..43c8252753 100644 --- a/test/files/neg/t6666.check +++ b/test/files/neg/t6666.check @@ -1,28 +1,28 @@ -t6666.scala:23: error: Implementation restriction: access of method x$2 in object O1 from anonymous class 2, would require illegal premature access to object O1 +t6666.scala:23: error: Implementation restriction: access of method x$2 in object O1 from <$anon: Function0>, would require illegal premature access to object O1 F.byname(x) ^ -t6666.scala:30: error: Implementation restriction: access of value x$3 in object O2 from anonymous class 3, would require illegal premature access to object O2 +t6666.scala:30: error: Implementation restriction: access of value x$3 in object O2 from <$anon: Function0>, would require illegal premature access to object O2 F.byname(x) ^ -t6666.scala:37: error: Implementation restriction: access of method x$4 in object O3 from anonymous class 4, would require illegal premature access to object O3 +t6666.scala:37: error: Implementation restriction: access of method x$4 in object O3 from <$anon: Function0>, would require illegal premature access to object O3 F.hof(() => x) ^ -t6666.scala:50: error: Implementation restriction: access of method x$6 in class C1 from anonymous class 7, would require illegal premature access to the unconstructed `this` of class C1 +t6666.scala:50: error: Implementation restriction: access of method x$6 in class C1 from <$anon: Function0>, would require illegal premature access to the unconstructed `this` of class C1 F.byname(x) ^ -t6666.scala:54: error: Implementation restriction: access of value x$7 in class C2 from anonymous class 8, would require illegal premature access to the unconstructed `this` of class C2 +t6666.scala:54: error: Implementation restriction: access of value x$7 in class C2 from <$anon: Function0>, would require illegal premature access to the unconstructed `this` of class C2 F.byname(x) ^ -t6666.scala:58: error: Implementation restriction: access of method x$8 in class C3 from anonymous class 9, would require illegal premature access to the unconstructed `this` of class C3 +t6666.scala:58: error: Implementation restriction: access of method x$8 in class C3 from <$anon: Function0>, would require illegal premature access to the unconstructed `this` of class C3 F.hof(() => x) ^ t6666.scala:62: error: Implementation restriction: access of method x$9 in class C4 from object Nested$4, would require illegal premature access to the unconstructed `this` of class C4 object Nested { def xx = x} ^ -t6666.scala:76: error: Implementation restriction: access of method x$11 in class C11 from anonymous class 12, would require illegal premature access to the unconstructed `this` of class C11 +t6666.scala:76: error: Implementation restriction: access of method x$11 in class C11 from <$anon: Function0>, would require illegal premature access to the unconstructed `this` of class C11 F.byname(x) ^ -t6666.scala:95: error: Implementation restriction: access of method x$12 in class C13 from anonymous class 13, would require illegal premature access to the unconstructed `this` of class C13 +t6666.scala:95: error: Implementation restriction: access of method x$12 in class C13 from <$anon: Function0>, would require illegal premature access to the unconstructed `this` of class C13 F.hof(() => x) ^ t6666.scala:104: error: Implementation restriction: access of method x$13 in class C14 from object Nested$5, would require illegal premature access to the unconstructed `this` of class C14 diff --git a/test/files/neg/t6666c.check b/test/files/neg/t6666c.check index 8fb9f4ba14..384e52a9fc 100644 --- a/test/files/neg/t6666c.check +++ b/test/files/neg/t6666c.check @@ -4,7 +4,7 @@ class D extends C({def x = 0; object X { x }}) t6666c.scala:5: error: Implementation restriction: access of method x$2 in class D1 from object X$5, would require illegal premature access to the unconstructed `this` of class D1 class D1 extends C1({def x = 0; () => {object X { x }}}) ^ -t6666c.scala:8: error: Implementation restriction: access of method x$3 from object X$6, would require illegal premature access to the unconstructed `this` of anonymous class 2 +t6666c.scala:8: error: Implementation restriction: access of method x$3 from object X$6, would require illegal premature access to the unconstructed `this` of <$anon: Function0> class D2 extends C2({def x = 0; object X { x }}) ^ three errors found diff --git a/test/files/neg/t6666e.check b/test/files/neg/t6666e.check index 9fcc3ab718..3189612314 100644 --- a/test/files/neg/t6666e.check +++ b/test/files/neg/t6666e.check @@ -1,4 +1,4 @@ -t6666e.scala:8: error: Implementation restriction: anonymous class $anonfun requires premature access to class Crash. +t6666e.scala:8: error: Implementation restriction: <$anon: Nothing => Unit> requires premature access to class Crash. this(Nil.collect{case x =>}) ^ one error found diff --git a/test/files/run/existentials3-new.check b/test/files/run/existentials3-new.check index c0233d2267..7f02866a29 100644 --- a/test/files/run/existentials3-new.check +++ b/test/files/run/existentials3-new.check @@ -1,8 +1,8 @@ Bar.type, t=TypeRef, s=type Bar.type Bar, t=TypeRef, s=type Bar -Test.ToS, t=RefinedType, s=f3 -Test.ToS, t=RefinedType, s=f4 -Test.ToS, t=RefinedType, s=f5 +Test.ToS, t=RefinedType, s=<refinement of Test.ToS> +Test.ToS, t=RefinedType, s=<refinement of Test.ToS> +Test.ToS, t=RefinedType, s=<refinement of Test.ToS> () => Test.ToS, t=TypeRef, s=trait Function0 () => Test.ToS, t=TypeRef, s=trait Function0 $anon, t=TypeRef, s=type $anon @@ -12,9 +12,9 @@ List[Seq[Int]], t=TypeRef, s=class List List[Seq[U forSome { type U <: Int }]], t=TypeRef, s=class List Bar.type, t=TypeRef, s=type Bar.type Bar, t=TypeRef, s=type Bar -Test.ToS, t=RefinedType, s=g3 -Test.ToS, t=RefinedType, s=g4 -Test.ToS, t=RefinedType, s=g5 +Test.ToS, t=RefinedType, s=<refinement of Test.ToS> +Test.ToS, t=RefinedType, s=<refinement of Test.ToS> +Test.ToS, t=RefinedType, s=<refinement of Test.ToS> () => Test.ToS, t=TypeRef, s=trait Function0 () => Test.ToS, t=TypeRef, s=trait Function0 $anon, t=TypeRef, s=type $anon diff --git a/test/files/run/macro-term-declared-in-trait.check b/test/files/run/macro-term-declared-in-trait.check index 0d70ac74f3..0f3756ddb6 100644 --- a/test/files/run/macro-term-declared-in-trait.check +++ b/test/files/run/macro-term-declared-in-trait.check @@ -1,6 +1,6 @@ prefix = Expr[Nothing]({ final class $anon extends AnyRef with Base { - def <init>(): anonymous class $anon = { + def <init>(): <$anon: Base> = { $anon.super.<init>(); () }; diff --git a/test/files/run/t5256g.check b/test/files/run/t5256g.check index c9c8d6e63d..cef3a413c2 100644 --- a/test/files/run/t5256g.check +++ b/test/files/run/t5256g.check @@ -1,3 +1,5 @@ -anonymous class $anon$1 +$anon Test.$anon$1 -A with B{def <init>(): A with B} +A with B { + def <init>(): A with B +} diff --git a/test/files/run/t5256h.check b/test/files/run/t5256h.check index 1b23a71a4c..1a4a92a684 100644 --- a/test/files/run/t5256h.check +++ b/test/files/run/t5256h.check @@ -1,4 +1,4 @@ -anonymous class $anon$1 +$anon Test.$anon$1 java.lang.Object { final private val x: Int diff --git a/test/files/run/t6028.check b/test/files/run/t6028.check index 46974589d3..b37bf51d73 100644 --- a/test/files/run/t6028.check +++ b/test/files/run/t6028.check @@ -11,7 +11,7 @@ package <empty> { def foo(methodParam: Int): Function0 = { val methodLocal: Int = 0; { - (new anonymous class $anonfun$foo$1(T.this, methodParam, methodLocal): Function0) + (new <$anon: Function0>(T.this, methodParam, methodLocal): Function0) } }; def bar(barParam: Int): Object = { @@ -21,11 +21,11 @@ package <empty> { def tryy(tryyParam: Int): Function0 = { var tryyLocal: runtime.IntRef = scala.runtime.IntRef.create(0); { - (new anonymous class $anonfun$tryy$1(T.this, tryyParam, tryyLocal): Function0) + (new <$anon: Function0>(T.this, tryyParam, tryyLocal): Function0) } }; @SerialVersionUID(0) final <synthetic> class $anonfun$foo$1 extends runtime.AbstractFunction0$mcI$sp with Serializable { - def <init>($outer: T, methodParam$1: Int, methodLocal$1: Int): anonymous class $anonfun$foo$1 = { + def <init>($outer: T, methodParam$1: Int, methodLocal$1: Int): <$anon: Function0> = { $anonfun$foo$1.super.<init>(); () }; @@ -61,7 +61,7 @@ package <empty> { scala.this.Predef.print(scala.Int.box(barParam$1)) }; @SerialVersionUID(0) final <synthetic> class $anonfun$tryy$1 extends runtime.AbstractFunction0$mcV$sp with Serializable { - def <init>($outer: T, tryyParam$1: Int, tryyLocal$1: runtime.IntRef): anonymous class $anonfun$tryy$1 = { + def <init>($outer: T, tryyParam$1: Int, tryyLocal$1: runtime.IntRef): <$anon: Function0> = { $anonfun$tryy$1.super.<init>(); () }; diff --git a/test/files/run/t6555.check b/test/files/run/t6555.check index a18a8e8023..9ac115a13f 100644 --- a/test/files/run/t6555.check +++ b/test/files/run/t6555.check @@ -7,14 +7,14 @@ package <empty> { }; private[this] val f: Int => Int = { @SerialVersionUID(0) final <synthetic> class $anonfun extends scala.runtime.AbstractFunction1$mcII$sp with Serializable { - def <init>(): anonymous class $anonfun = { + def <init>(): <$anon: Int => Int> = { $anonfun.super.<init>(); () }; final def apply(param: Int): Int = $anonfun.this.apply$mcII$sp(param); <specialized> def apply$mcII$sp(param: Int): Int = param }; - (new anonymous class $anonfun(): Int => Int) + (new <$anon: Int => Int>(): Int => Int) }; <stable> <accessor> def f(): Int => Int = Foo.this.f } diff --git a/test/files/run/toolbox_typecheck_macrosdisabled.check b/test/files/run/toolbox_typecheck_macrosdisabled.check index 688f37927c..3de296f1ad 100644 --- a/test/files/run/toolbox_typecheck_macrosdisabled.check +++ b/test/files/run/toolbox_typecheck_macrosdisabled.check @@ -2,7 +2,7 @@ val $u: ru.type = ru; val $m: $u.Mirror = ru.runtimeMirror({ final class $anon extends scala.AnyRef { - def <init>(): anonymous class $anon = { + def <init>(): <$anon: AnyRef> = { $anon.super.<init>(); () }; diff --git a/test/files/run/toolbox_typecheck_macrosdisabled2.check b/test/files/run/toolbox_typecheck_macrosdisabled2.check index bdcdb421fd..9810946024 100644 --- a/test/files/run/toolbox_typecheck_macrosdisabled2.check +++ b/test/files/run/toolbox_typecheck_macrosdisabled2.check @@ -2,7 +2,7 @@ val $u: ru.type = ru; val $m: $u.Mirror = ru.runtimeMirror({ final class $anon extends scala.AnyRef { - def <init>(): anonymous class $anon = { + def <init>(): <$anon: AnyRef> = { $anon.super.<init>(); () }; |