diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/names-defaults-neg.check | 13 | ||||
-rw-r--r-- | test/files/neg/names-defaults-neg.scala | 5 |
2 files changed, 13 insertions, 5 deletions
diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check index 38bacc0888..b2b00b7050 100644 --- a/test/files/neg/names-defaults-neg.check +++ b/test/files/neg/names-defaults-neg.check @@ -104,17 +104,20 @@ names-defaults-neg.scala:82: error: type mismatch; Error occurred in an application involving default arguments. new A2[String]() ^ -names-defaults-neg.scala:115: error: reference to var2 is ambiguous; it is both, a parameter +names-defaults-neg.scala:86: error: module extending its companion class cannot use default constructor arguments + object C extends C() + ^ +names-defaults-neg.scala:120: error: reference to var2 is ambiguous; it is both, a parameter name of the method and the name of a variable currently in scope. delay(var2 = 40) ^ -names-defaults-neg.scala:118: error: missing parameter type for expanded function ((x$1) => a = x$1) +names-defaults-neg.scala:123: error: missing parameter type for expanded function ((x$1) => a = x$1) val taf2: Int => Unit = testAnnFun(a = _, b = get("+")) ^ -names-defaults-neg.scala:119: error: parameter specified twice: a +names-defaults-neg.scala:124: error: parameter specified twice: a val taf3 = testAnnFun(b = _: String, a = get(8)) ^ -names-defaults-neg.scala:120: error: wrong number of parameters; expected = 2 +names-defaults-neg.scala:125: error: wrong number of parameters; expected = 2 val taf4: (Int, String) => Unit = testAnnFun(_, b = _) ^ -28 errors found +29 errors found diff --git a/test/files/neg/names-defaults-neg.scala b/test/files/neg/names-defaults-neg.scala index e73dc71c9b..43883540a0 100644 --- a/test/files/neg/names-defaults-neg.scala +++ b/test/files/neg/names-defaults-neg.scala @@ -81,6 +81,11 @@ object Test extends Application { // correct error message new A2[String]() + object t3648 { + class C(val s: String = "") + object C extends C() + } + // DEFINITIONS def test1(a: Int, b: String) = a +": "+ b def test2(x: Unit) = println("test2") |