You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 1, 2020. It is now read-only.
valnote="type-checking the invocation of "+ param.owner +" checks if the named argument expression '"+ param.name +" = ...' is a valid assignment\n"+
1040
+
"in the current scope. The resulting type inference error (see above) can be fixed by providing an explicit type in the local definition for "+ param.name +"."
Copy file name to clipboardExpand all lines: test/files/neg/names-defaults-neg.check
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -149,8 +149,12 @@ names-defaults-neg.scala:170: error: reference to x is ambiguous; it is both a m
149
149
names-defaults-neg.scala:177: error: variable definition needs type because 'x' is used as a named argument in its body.
150
150
class u15 { var x = u.f(x = 1) }
151
151
^
152
+
names-defaults-neg.scala:177: warning: type-checking the invocation of method f checks if the named argument expression 'x = ...' is a valid assignment
153
+
in the current scope. The resulting type inference error (see above) can be fixed by providing an explicit type in the local definition for x.
154
+
class u15 { var x = u.f(x = 1) }
155
+
^
152
156
names-defaults-neg.scala:180: error: reference to x is ambiguous; it is both a method parameter and a variable in scope.
0 commit comments