summaryrefslogtreecommitdiff
path: root/test/files/neg/names-defaults-neg.check
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2010-08-05 08:20:47 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2010-08-05 08:20:47 +0000
commit23bd1501fc8aefecc3054c846973c05d260bb987 (patch)
treeb387765e88d41cd27797b5718cb5d97f1f6a31a0 /test/files/neg/names-defaults-neg.check
parent8a8172da3cda740586f86a3b4b276e7d9235bca6 (diff)
downloadscala-23bd1501fc8aefecc3054c846973c05d260bb987.tar.gz
scala-23bd1501fc8aefecc3054c846973c05d260bb987.tar.bz2
scala-23bd1501fc8aefecc3054c846973c05d260bb987.zip
close #3685. review by moors.
Diffstat (limited to 'test/files/neg/names-defaults-neg.check')
-rw-r--r--test/files/neg/names-defaults-neg.check28
1 files changed, 27 insertions, 1 deletions
diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check
index ec786c5e03..1f77b828b7 100644
--- a/test/files/neg/names-defaults-neg.check
+++ b/test/files/neg/names-defaults-neg.check
@@ -132,5 +132,31 @@ names-defaults-neg.scala:131: error: parameter specified twice: a
names-defaults-neg.scala:132: error: wrong number of parameters; expected = 2
val taf4: (Int, String) => Unit = testAnnFun(_, b = _)
^
+names-defaults-neg.scala:140: error: variable definition needs type because the name is used as named argument the definition.
+ def t3 { var x = t.f(x = 1) }
+ ^
+names-defaults-neg.scala:143: error: variable definition needs type because the name is used as named argument the definition.
+ object t6 { var x = t.f(x = 1) }
+ ^
+names-defaults-neg.scala:146: error: variable definition needs type because the name is used as named argument the definition.
+ class t9 { var x = t.f(x = 1) }
+ ^
+names-defaults-neg.scala:160: error: variable definition needs type because the name is used as named argument the definition.
+ def u3 { var x = u.f(x = 1) }
+ ^
+names-defaults-neg.scala:163: error: variable definition needs type because the name is used as named argument the definition.
+ def u6 { var x = u.f(x = "32") }
+ ^
+names-defaults-neg.scala:166: error: reference to x is ambiguous; it is both, a parameter
+name of the method and the name of a variable currently in scope.
+ def u9 { var x: Int = u.f(x = 1) }
+ ^
+names-defaults-neg.scala:173: error: variable definition needs type because the name is used as named argument the definition.
+ class u15 { var x = u.f(x = 1) }
+ ^
+names-defaults-neg.scala:176: error: reference to x is ambiguous; it is both, a parameter
+name of the method and the name of a variable currently in scope.
+ class u18 { var x: Int = u.f(x = 1) }
+ ^
one warning found
-32 errors found
+40 errors found