diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/names-defaults-neg.check | 16 | ||||
-rw-r--r-- | test/files/neg/t4515.check | 12 | ||||
-rw-r--r-- | test/files/neg/t556.check | 5 | ||||
-rw-r--r-- | test/files/neg/t5572.check | 7 | ||||
-rw-r--r-- | test/files/neg/t6829.check | 22 | ||||
-rw-r--r-- | test/files/neg/t7895b.check | 7 | ||||
-rw-r--r-- | test/files/neg/t7895b.scala | 5 | ||||
-rw-r--r-- | test/files/neg/typeerror.check | 7 |
8 files changed, 75 insertions, 6 deletions
diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check index cdc12c2490..880ddc4327 100644 --- a/test/files/neg/names-defaults-neg.check +++ b/test/files/neg/names-defaults-neg.check @@ -7,6 +7,11 @@ names-defaults-neg.scala:5: error: type mismatch; required: Int test1(b = 2, a = "#") ^ +names-defaults-neg.scala:5: error: type mismatch; + found : Int(2) + required: String + test1(b = 2, a = "#") + ^ names-defaults-neg.scala:8: error: positional after named argument. test1(b = "(*", 23) ^ @@ -122,6 +127,12 @@ names-defaults-neg.scala:131: error: reference to var2 is ambiguous; it is both names-defaults-neg.scala:134: error: missing parameter type for expanded function ((x$1) => a = x$1) val taf2: Int => Unit = testAnnFun(a = _, b = get("+")) ^ +names-defaults-neg.scala:134: error: not found: value a + val taf2: Int => Unit = testAnnFun(a = _, b = get("+")) + ^ +names-defaults-neg.scala:134: error: not found: value get + val taf2: Int => Unit = testAnnFun(a = _, b = get("+")) + ^ names-defaults-neg.scala:135: error: parameter 'a' is already specified at parameter position 1 val taf3 = testAnnFun(b = _: String, a = get(8)) ^ @@ -131,6 +142,9 @@ names-defaults-neg.scala:136: error: missing parameter type for expanded functio names-defaults-neg.scala:136: error: missing parameter type for expanded function ((x$4) => b = x$4) val taf4: (Int, String) => Unit = testAnnFun(_, b = _) ^ +names-defaults-neg.scala:136: error: not found: value b + val taf4: (Int, String) => Unit = testAnnFun(_, b = _) + ^ names-defaults-neg.scala:144: error: variable definition needs type because 'x' is used as a named argument in its body. def t3 { var x = t.f(x = 1) } ^ @@ -168,4 +182,4 @@ names-defaults-neg.scala:180: error: reference to x is ambiguous; it is both a m class u18 { var x: Int = u.f(x = 1) } ^ four warnings found -42 errors found +46 errors found diff --git a/test/files/neg/t4515.check b/test/files/neg/t4515.check index 64e7cc1ca7..708fcfbd29 100644 --- a/test/files/neg/t4515.check +++ b/test/files/neg/t4515.check @@ -3,4 +3,14 @@ t4515.scala:37: error: type mismatch; required: _$2 handler.onEvent(target, ctx.getEvent, node, ctx) ^ -one error found +t4515.scala:37: error: type mismatch; + found : Main.DerivedPushNode[_$1] where type _$1 + required: Main.PushNode[_$2] + handler.onEvent(target, ctx.getEvent, node, ctx) + ^ +t4515.scala:37: error: type mismatch; + found : Main.PushEventContext[_$1] where type _$1 + required: Main.PushEventContext[_$2] + handler.onEvent(target, ctx.getEvent, node, ctx) + ^ +three errors found diff --git a/test/files/neg/t556.check b/test/files/neg/t556.check index 5135dc92ef..30cc296b35 100644 --- a/test/files/neg/t556.check +++ b/test/files/neg/t556.check @@ -1,4 +1,7 @@ t556.scala:3: error: missing parameter type def g:Int = f((x,y)=>x) ^ -one error found +t556.scala:3: error: missing parameter type + def g:Int = f((x,y)=>x) + ^ +two errors found diff --git a/test/files/neg/t5572.check b/test/files/neg/t5572.check index 7b1e290861..3c9adf41cd 100644 --- a/test/files/neg/t5572.check +++ b/test/files/neg/t5572.check @@ -3,9 +3,14 @@ t5572.scala:16: error: type mismatch; required: A Z.transf(a, b) match { ^ +t5572.scala:16: error: type mismatch; + found : A + required: B + Z.transf(a, b) match { + ^ t5572.scala:18: error: type mismatch; found : A required: B run(sth, b) ^ -two errors found +three errors found diff --git a/test/files/neg/t6829.check b/test/files/neg/t6829.check index c7c641844e..a0b43e3b52 100644 --- a/test/files/neg/t6829.check +++ b/test/files/neg/t6829.check @@ -20,11 +20,31 @@ t6829.scala:50: error: type mismatch; required: _53.State where val _53: G val r = rewards(agent).r(s,a,s2) ^ +t6829.scala:50: error: type mismatch; + found : a.type (with underlying type T2) + required: _53.Action where val _53: G + val r = rewards(agent).r(s,a,s2) + ^ +t6829.scala:50: error: type mismatch; + found : s2.type (with underlying type T3) + required: _53.State where val _53: G + val r = rewards(agent).r(s,a,s2) + ^ t6829.scala:51: error: type mismatch; found : s.type (with underlying type T1) required: _50.State agent.learn(s,a,s2,r): G#Agent ^ +t6829.scala:51: error: type mismatch; + found : a.type (with underlying type T2) + required: _50.Action + agent.learn(s,a,s2,r): G#Agent + ^ +t6829.scala:51: error: type mismatch; + found : s2.type (with underlying type T3) + required: _50.State + agent.learn(s,a,s2,r): G#Agent + ^ t6829.scala:53: error: not found: value nextState Error occurred in an application involving default arguments. copy(agents = updatedAgents, state = nextState, pastHistory = currentHistory) @@ -33,4 +53,4 @@ t6829.scala:53: error: not found: value currentHistory Error occurred in an application involving default arguments. copy(agents = updatedAgents, state = nextState, pastHistory = currentHistory) ^ -9 errors found +13 errors found diff --git a/test/files/neg/t7895b.check b/test/files/neg/t7895b.check new file mode 100644 index 0000000000..87ea72704e --- /dev/null +++ b/test/files/neg/t7895b.check @@ -0,0 +1,7 @@ +t7895b.scala:4: error: not found: value a + foo(a, b) + ^ +t7895b.scala:4: error: not found: value b + foo(a, b) + ^ +two errors found diff --git a/test/files/neg/t7895b.scala b/test/files/neg/t7895b.scala new file mode 100644 index 0000000000..1603027446 --- /dev/null +++ b/test/files/neg/t7895b.scala @@ -0,0 +1,5 @@ +object Test { + def foo(a: Any*) = () + + foo(a, b) +} diff --git a/test/files/neg/typeerror.check b/test/files/neg/typeerror.check index 3ce11dad8a..f117e702f0 100644 --- a/test/files/neg/typeerror.check +++ b/test/files/neg/typeerror.check @@ -3,4 +3,9 @@ typeerror.scala:6: error: type mismatch; required: scala.Long else add2(x.head, y.head) :: add(x.tail, y.tail) ^ -one error found +typeerror.scala:6: error: type mismatch; + found : Long(in method add) + required: scala.Long + else add2(x.head, y.head) :: add(x.tail, y.tail) + ^ +two errors found |