diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/names-defaults-neg.check | 2 | ||||
-rw-r--r-- | test/files/neg/wrong-args-for-none.check | 4 | ||||
-rw-r--r-- | test/files/neg/wrong-args-for-none.scala | 6 |
3 files changed, 11 insertions, 1 deletions
diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check index 2809350855..f3c45a6aa0 100644 --- a/test/files/neg/names-defaults-neg.check +++ b/test/files/neg/names-defaults-neg.check @@ -76,7 +76,7 @@ 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")) // ambigous reference ^ -names-defaults-neg.scala:69: error: wrong number of arguments for <none>: (x: Int, y: String)A1 +names-defaults-neg.scala:69: error: wrong number of arguments for pattern A1(x: Int,y: String) A1() match { case A1(_) => () } ^ names-defaults-neg.scala:76: error: no type parameters for method test4: (x: T[T[List[T[X forSome { type X }]]]])T[T[List[T[X forSome { type X }]]]] exist so that it can be applied to arguments (List[Int]) diff --git a/test/files/neg/wrong-args-for-none.check b/test/files/neg/wrong-args-for-none.check new file mode 100644 index 0000000000..d3b2d572ab --- /dev/null +++ b/test/files/neg/wrong-args-for-none.check @@ -0,0 +1,4 @@ +wrong-args-for-none.scala:5: error: wrong number of arguments for pattern Test.Foo(x: Int,y: Int) + def f(x: Any) = x match { case Bar(Foo(5)) => } + ^ +one error found diff --git a/test/files/neg/wrong-args-for-none.scala b/test/files/neg/wrong-args-for-none.scala new file mode 100644 index 0000000000..1caa4782a3 --- /dev/null +++ b/test/files/neg/wrong-args-for-none.scala @@ -0,0 +1,6 @@ +object Test { + case class Foo(x: Int, y: Int) + case class Bar(x: AnyRef) + + def f(x: Any) = x match { case Bar(Foo(5)) => } +} |