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/files/neg | |
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/files/neg')
-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 |
11 files changed, 27 insertions, 22 deletions
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 |