diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/anytrait.check | 5 | ||||
-rw-r--r-- | test/files/neg/names-defaults-neg.check | 8 | ||||
-rw-r--r-- | test/files/neg/protected-constructors.check | 18 | ||||
-rw-r--r-- | test/files/neg/sabin2.check | 2 | ||||
-rw-r--r-- | test/files/neg/t1838.check | 6 | ||||
-rw-r--r-- | test/files/neg/t4158.check | 6 | ||||
-rw-r--r-- | test/files/neg/t6446-additional.check | 21 | ||||
-rw-r--r-- | test/files/neg/t6446-missing.check | 19 | ||||
-rw-r--r-- | test/files/neg/t6446-show-phases.check | 19 | ||||
-rw-r--r-- | test/files/neg/t6666.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6829.check | 12 | ||||
-rw-r--r-- | test/files/neg/t712.check | 3 | ||||
-rw-r--r-- | test/files/neg/t7494-no-options.check | 21 | ||||
-rw-r--r-- | test/files/neg/t8217-local-alias-requires-rhs.check | 6 | ||||
-rw-r--r-- | test/files/neg/t963.check | 10 |
15 files changed, 79 insertions, 81 deletions
diff --git a/test/files/neg/anytrait.check b/test/files/neg/anytrait.check index fabe74d379..6d9d681d60 100644 --- a/test/files/neg/anytrait.check +++ b/test/files/neg/anytrait.check @@ -4,4 +4,7 @@ anytrait.scala:3: error: field definition is not allowed in universal trait exte anytrait.scala:5: error: this statement is not allowed in universal trait extending from class Any { x += 1 } ^ -two errors found +anytrait.scala:9: error: field definition is not allowed in universal trait extending from class Any + val y: T + ^ +three errors found diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check index 0a7b1a7157..af164d90ea 100644 --- a/test/files/neg/names-defaults-neg.check +++ b/test/files/neg/names-defaults-neg.check @@ -1,7 +1,3 @@ -names-defaults-neg.scala:65: error: not enough arguments for method apply: (a: Int, b: String)(c: Int*)Fact in object Fact. -Unspecified value parameter b. - val fac = Fact(1)(2, 3) - ^ names-defaults-neg.scala:5: error: type mismatch; found : String("#") required: Int @@ -81,6 +77,10 @@ and method f in object t8 of type (a: Int, b: Object)String match argument types (a: Int,b: String) and expected result type Any println(t8.f(a = 0, b = "1")) // ambiguous reference ^ +names-defaults-neg.scala:65: error: not enough arguments for method apply: (a: Int, b: String)(c: Int*)Fact in object Fact. +Unspecified value parameter b. + val fac = Fact(1)(2, 3) + ^ names-defaults-neg.scala:69: error: wrong number of arguments for pattern A1(x: Int,y: String) A1() match { case A1(_) => () } ^ diff --git a/test/files/neg/protected-constructors.check b/test/files/neg/protected-constructors.check index 0279f5815d..4f076ec993 100644 --- a/test/files/neg/protected-constructors.check +++ b/test/files/neg/protected-constructors.check @@ -1,3 +1,12 @@ +protected-constructors.scala:15: error: class Foo3 in object Ding cannot be accessed in object dingus.Ding + Access to protected class Foo3 not permitted because + enclosing object P in package hungus is not a subclass of + object Ding in package dingus where target is defined + class Bar3 extends Ding.Foo3("abc") + ^ +protected-constructors.scala:15: error: no arguments allowed for nullary constructor Object: ()Object + class Bar3 extends Ding.Foo3("abc") + ^ protected-constructors.scala:17: error: no arguments allowed for nullary constructor Foo1: ()dingus.Foo1 val foo1 = new Foo1("abc") ^ @@ -13,13 +22,4 @@ protected-constructors.scala:19: error: class Foo3 in object Ding cannot be acce object Ding in package dingus where target is defined val foo3 = new Ding.Foo3("abc") ^ -protected-constructors.scala:15: error: class Foo3 in object Ding cannot be accessed in object dingus.Ding - Access to protected class Foo3 not permitted because - enclosing object P in package hungus is not a subclass of - object Ding in package dingus where target is defined - class Bar3 extends Ding.Foo3("abc") - ^ -protected-constructors.scala:15: error: no arguments allowed for nullary constructor Object: ()Object - class Bar3 extends Ding.Foo3("abc") - ^ 5 errors found diff --git a/test/files/neg/sabin2.check b/test/files/neg/sabin2.check index 8a09361069..aa0e8f734c 100644 --- a/test/files/neg/sabin2.check +++ b/test/files/neg/sabin2.check @@ -1,6 +1,6 @@ sabin2.scala:22: error: type mismatch; found : Test.Base#T - required: _7.T where val _7: Test.Base + required: _5.T where val _5: Test.Base a.set(b.get()) // Error ^ one error found diff --git a/test/files/neg/t1838.check b/test/files/neg/t1838.check index a476158c7b..af811a3810 100644 --- a/test/files/neg/t1838.check +++ b/test/files/neg/t1838.check @@ -1,7 +1,7 @@ -t1838.scala:6: error: `sealed' modifier can be used only for classes - sealed val v = 0 - ^ t1838.scala:5: error: `sealed' modifier can be used only for classes sealed def f = 0 ^ +t1838.scala:6: error: `sealed' modifier can be used only for classes + sealed val v = 0 + ^ two errors found diff --git a/test/files/neg/t4158.check b/test/files/neg/t4158.check index af281c52cd..7bac6558f7 100644 --- a/test/files/neg/t4158.check +++ b/test/files/neg/t4158.check @@ -1,7 +1,7 @@ -t4158.scala:3: error: an expression of type Null is ineligible for implicit conversion - var y = null: Int - ^ t4158.scala:2: error: an expression of type Null is ineligible for implicit conversion var x: Int = null ^ +t4158.scala:3: error: an expression of type Null is ineligible for implicit conversion + var y = null: Int + ^ two errors found diff --git a/test/files/neg/t6446-additional.check b/test/files/neg/t6446-additional.check index 45db63317c..23df978cd9 100644 --- a/test/files/neg/t6446-additional.check +++ b/test/files/neg/t6446-additional.check @@ -10,19 +10,18 @@ superaccessors 6 add super accessors in traits and nested classes pickler 8 serialize symbol tables refchecks 9 reference/override checking, translate nested objects uncurry 10 uncurry, translate function values to anonymous classes - fields 11 synthesize accessors and fields + fields 11 synthesize accessors and fields, including bitmaps for la... tailcalls 12 replace tail calls by jumps specialize 13 @specialized-driven class and method specialization explicitouter 14 this refs to outer pointers erasure 15 erase types, add interfaces for traits posterasure 16 clean up erased inline classes - lazyvals 17 allocate bitmaps, translate lazy vals into lazified defs - lambdalift 18 move nested functions to top level - constructors 19 move field definitions into constructors - flatten 20 eliminate inner classes - mixin 21 mixin composition - cleanup 22 platform-specific cleanups, generate reflective calls - delambdafy 23 remove lambdas - jvm 24 generate JVM bytecode - ploogin 25 A sample phase that does so many things it's kind of hard... - terminal 26 the last phase during a compilation run + lambdalift 17 move nested functions to top level + constructors 18 move field definitions into constructors + flatten 19 eliminate inner classes + mixin 20 mixin composition + cleanup 21 platform-specific cleanups, generate reflective calls + delambdafy 22 remove lambdas + jvm 23 generate JVM bytecode + ploogin 24 A sample phase that does so many things it's kind of hard... + terminal 25 the last phase during a compilation run diff --git a/test/files/neg/t6446-missing.check b/test/files/neg/t6446-missing.check index 04523d18e6..c0a8fea140 100644 --- a/test/files/neg/t6446-missing.check +++ b/test/files/neg/t6446-missing.check @@ -11,18 +11,17 @@ superaccessors 6 add super accessors in traits and nested classes pickler 8 serialize symbol tables refchecks 9 reference/override checking, translate nested objects uncurry 10 uncurry, translate function values to anonymous classes - fields 11 synthesize accessors and fields + fields 11 synthesize accessors and fields, including bitmaps for la... tailcalls 12 replace tail calls by jumps specialize 13 @specialized-driven class and method specialization explicitouter 14 this refs to outer pointers erasure 15 erase types, add interfaces for traits posterasure 16 clean up erased inline classes - lazyvals 17 allocate bitmaps, translate lazy vals into lazified defs - lambdalift 18 move nested functions to top level - constructors 19 move field definitions into constructors - flatten 20 eliminate inner classes - mixin 21 mixin composition - cleanup 22 platform-specific cleanups, generate reflective calls - delambdafy 23 remove lambdas - jvm 24 generate JVM bytecode - terminal 25 the last phase during a compilation run + lambdalift 17 move nested functions to top level + constructors 18 move field definitions into constructors + flatten 19 eliminate inner classes + mixin 20 mixin composition + cleanup 21 platform-specific cleanups, generate reflective calls + delambdafy 22 remove lambdas + jvm 23 generate JVM bytecode + terminal 24 the last phase during a compilation run diff --git a/test/files/neg/t6446-show-phases.check b/test/files/neg/t6446-show-phases.check index 03f8273c17..cf8595db5d 100644 --- a/test/files/neg/t6446-show-phases.check +++ b/test/files/neg/t6446-show-phases.check @@ -10,18 +10,17 @@ superaccessors 6 add super accessors in traits and nested classes pickler 8 serialize symbol tables refchecks 9 reference/override checking, translate nested objects uncurry 10 uncurry, translate function values to anonymous classes - fields 11 synthesize accessors and fields + fields 11 synthesize accessors and fields, including bitmaps for la... tailcalls 12 replace tail calls by jumps specialize 13 @specialized-driven class and method specialization explicitouter 14 this refs to outer pointers erasure 15 erase types, add interfaces for traits posterasure 16 clean up erased inline classes - lazyvals 17 allocate bitmaps, translate lazy vals into lazified defs - lambdalift 18 move nested functions to top level - constructors 19 move field definitions into constructors - flatten 20 eliminate inner classes - mixin 21 mixin composition - cleanup 22 platform-specific cleanups, generate reflective calls - delambdafy 23 remove lambdas - jvm 24 generate JVM bytecode - terminal 25 the last phase during a compilation run + lambdalift 17 move nested functions to top level + constructors 18 move field definitions into constructors + flatten 19 eliminate inner classes + mixin 20 mixin composition + cleanup 21 platform-specific cleanups, generate reflective calls + delambdafy 22 remove lambdas + jvm 23 generate JVM bytecode + terminal 24 the last phase during a compilation run diff --git a/test/files/neg/t6666.check b/test/files/neg/t6666.check index 090ef72770..bae948fe56 100644 --- a/test/files/neg/t6666.check +++ b/test/files/neg/t6666.check @@ -1,7 +1,7 @@ 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 method x$3 in object O2 from <$anon: Function0>, would require illegal premature access to object O2 +t6666.scala:30: error: Implementation restriction: access of lazy 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 <$anon: Function0>, would require illegal premature access to object O3 @@ -10,7 +10,7 @@ t6666.scala:37: error: Implementation restriction: access of method x$4 in objec 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 method x$7 in class C2 from <$anon: Function0>, would require illegal premature access to the unconstructed `this` of class C2 +t6666.scala:54: error: Implementation restriction: access of lazy 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 <$anon: Function0>, would require illegal premature access to the unconstructed `this` of class C3 diff --git a/test/files/neg/t6829.check b/test/files/neg/t6829.check index 914a1c9260..274094f791 100644 --- a/test/files/neg/t6829.check +++ b/test/files/neg/t6829.check @@ -17,32 +17,32 @@ t6829.scala:49: error: not found: value nextState ^ t6829.scala:50: error: type mismatch; found : s.type (with underlying type Any) - required: _53.State where val _53: G + required: _30.State where val _30: G val r = rewards(agent).r(s,a,s2) ^ t6829.scala:50: error: type mismatch; found : a.type (with underlying type Any) - required: _53.Action where val _53: G + required: _30.Action where val _30: G val r = rewards(agent).r(s,a,s2) ^ t6829.scala:50: error: type mismatch; found : s2.type (with underlying type Any) - required: _53.State where val _53: G + required: _30.State where val _30: G val r = rewards(agent).r(s,a,s2) ^ t6829.scala:51: error: type mismatch; found : s.type (with underlying type Any) - required: _50.State + required: _25.State agent.learn(s,a,s2,r): G#Agent ^ t6829.scala:51: error: type mismatch; found : a.type (with underlying type Any) - required: _50.Action + required: _25.Action agent.learn(s,a,s2,r): G#Agent ^ t6829.scala:51: error: type mismatch; found : s2.type (with underlying type Any) - required: _50.State + required: _25.State agent.learn(s,a,s2,r): G#Agent ^ t6829.scala:53: error: not found: value nextState diff --git a/test/files/neg/t712.check b/test/files/neg/t712.check index 831e943063..3f02b4b294 100644 --- a/test/files/neg/t712.check +++ b/test/files/neg/t712.check @@ -1,5 +1,4 @@ -t712.scala:10: error: value self is not a member of B.this.ParentImpl - Note: implicit method coerce is not applicable here because it comes after the application point and it lacks an explicit result type +t712.scala:10: error: overloaded method coerce needs result type implicit def coerce(p : ParentImpl) = p.self; ^ one error found diff --git a/test/files/neg/t7494-no-options.check b/test/files/neg/t7494-no-options.check index bb143e8644..138d2fe9a3 100644 --- a/test/files/neg/t7494-no-options.check +++ b/test/files/neg/t7494-no-options.check @@ -11,19 +11,18 @@ superaccessors 6 add super accessors in traits and nested classes pickler 8 serialize symbol tables refchecks 9 reference/override checking, translate nested objects uncurry 10 uncurry, translate function values to anonymous classes - fields 11 synthesize accessors and fields + fields 11 synthesize accessors and fields, including bitmaps for la... tailcalls 12 replace tail calls by jumps specialize 13 @specialized-driven class and method specialization explicitouter 14 this refs to outer pointers erasure 15 erase types, add interfaces for traits posterasure 16 clean up erased inline classes - lazyvals 17 allocate bitmaps, translate lazy vals into lazified defs - lambdalift 18 move nested functions to top level - constructors 19 move field definitions into constructors - flatten 20 eliminate inner classes - mixin 21 mixin composition - cleanup 22 platform-specific cleanups, generate reflective calls - delambdafy 23 remove lambdas - jvm 24 generate JVM bytecode - ploogin 25 A sample phase that does so many things it's kind of hard... - terminal 26 the last phase during a compilation run + lambdalift 17 move nested functions to top level + constructors 18 move field definitions into constructors + flatten 19 eliminate inner classes + mixin 20 mixin composition + cleanup 21 platform-specific cleanups, generate reflective calls + delambdafy 22 remove lambdas + jvm 23 generate JVM bytecode + ploogin 24 A sample phase that does so many things it's kind of hard... + terminal 25 the last phase during a compilation run diff --git a/test/files/neg/t8217-local-alias-requires-rhs.check b/test/files/neg/t8217-local-alias-requires-rhs.check index 0d4f0864ba..d970400ff6 100644 --- a/test/files/neg/t8217-local-alias-requires-rhs.check +++ b/test/files/neg/t8217-local-alias-requires-rhs.check @@ -1,9 +1,9 @@ -t8217-local-alias-requires-rhs.scala:6: error: only classes can have declared but undefined members - type B - ^ t8217-local-alias-requires-rhs.scala:3: error: only classes can have declared but undefined members type A ^ +t8217-local-alias-requires-rhs.scala:6: error: only classes can have declared but undefined members + type B + ^ t8217-local-alias-requires-rhs.scala:14: error: only classes can have declared but undefined members def this(a: Any) = { this(); type C } ^ diff --git a/test/files/neg/t963.check b/test/files/neg/t963.check index 483e53c77d..85b64b0bb5 100644 --- a/test/files/neg/t963.check +++ b/test/files/neg/t963.check @@ -1,12 +1,12 @@ +t963.scala:10: error: type mismatch; + found : AnyRef{def x: Integer} + required: AnyRef{val x: Integer} + val y2 : { val x : java.lang.Integer } = new { def x = new java.lang.Integer(r.nextInt) } + ^ t963.scala:14: error: stable identifier required, but y3.x.type found. val w3 : y3.x.type = y3.x ^ t963.scala:17: error: stable identifier required, but y4.x.type found. val w4 : y4.x.type = y4.x ^ -t963.scala:10: error: type mismatch; - found : AnyRef{def x: Integer} - required: AnyRef{val x: Integer} - val y2 : { val x : java.lang.Integer } = new { def x = new java.lang.Integer(r.nextInt) } - ^ three errors found |