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
Copy file name to clipboardExpand all lines: test/files/neg/names-defaults-neg.check
+27-21Lines changed: 27 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -118,68 +118,74 @@ names-defaults-neg.scala:93: warning: the parameter name y has been deprecated.
118
118
names-defaults-neg.scala:93: error: parameter 'b' is already specified at parameter position 1
119
119
deprNam3(y = 10, b = 2)
120
120
^
121
-
names-defaults-neg.scala:98: error: unknown parameter name: m
121
+
names-defaults-neg.scala:96: warning: naming parameter deprNam4Arg has been deprecated.
122
+
deprNam4(deprNam4Arg = null)
123
+
^
124
+
names-defaults-neg.scala:98: warning: naming parameter deprNam5Arg has been deprecated.
125
+
deprNam5(deprNam5Arg = null)
126
+
^
127
+
names-defaults-neg.scala:102: error: unknown parameter name: m
122
128
f3818(y = 1, m = 1)
123
129
^
124
-
names-defaults-neg.scala:131: error: reference to var2 is ambiguous; it is both a method parameter and a variable in scope.
130
+
names-defaults-neg.scala:135: error: reference to var2 is ambiguous; it is both a method parameter and a variable in scope.
125
131
delay(var2 = 40)
126
132
^
127
-
names-defaults-neg.scala:134: error: missing parameter type for expanded function ((x$1) => a = x$1)
133
+
names-defaults-neg.scala:138: error: missing parameter type for expanded function ((x$1) => a = x$1)
128
134
val taf2: Int => Unit = testAnnFun(a = _, b = get("+"))
129
135
^
130
-
names-defaults-neg.scala:134: error: not found: value a
136
+
names-defaults-neg.scala:138: error: not found: value a
131
137
val taf2: Int => Unit = testAnnFun(a = _, b = get("+"))
132
138
^
133
-
names-defaults-neg.scala:134: error: not found: value get
139
+
names-defaults-neg.scala:138: error: not found: value get
134
140
val taf2: Int => Unit = testAnnFun(a = _, b = get("+"))
135
141
^
136
-
names-defaults-neg.scala:135: error: parameter 'a' is already specified at parameter position 1
142
+
names-defaults-neg.scala:139: error: parameter 'a' is already specified at parameter position 1
137
143
val taf3 = testAnnFun(b = _: String, a = get(8))
138
144
^
139
-
names-defaults-neg.scala:136: error: missing parameter type for expanded function ((x$3) => testAnnFun(x$3, ((x$4) => b = x$4)))
145
+
names-defaults-neg.scala:140: error: missing parameter type for expanded function ((x$3) => testAnnFun(x$3, ((x$4) => b = x$4)))
140
146
val taf4: (Int, String) => Unit = testAnnFun(_, b = _)
141
147
^
142
-
names-defaults-neg.scala:136: error: missing parameter type for expanded function ((x$4) => b = x$4)
148
+
names-defaults-neg.scala:140: error: missing parameter type for expanded function ((x$4) => b = x$4)
143
149
val taf4: (Int, String) => Unit = testAnnFun(_, b = _)
144
150
^
145
-
names-defaults-neg.scala:136: error: not found: value b
151
+
names-defaults-neg.scala:140: error: not found: value b
146
152
val taf4: (Int, String) => Unit = testAnnFun(_, b = _)
147
153
^
148
-
names-defaults-neg.scala:144: error: variable definition needs type because 'x' is used as a named argument in its body.
154
+
names-defaults-neg.scala:148: error: variable definition needs type because 'x' is used as a named argument in its body.
149
155
def t3 { var x = t.f(x = 1) }
150
156
^
151
-
names-defaults-neg.scala:147: error: variable definition needs type because 'x' is used as a named argument in its body.
157
+
names-defaults-neg.scala:151: error: variable definition needs type because 'x' is used as a named argument in its body.
152
158
object t6 { var x = t.f(x = 1) }
153
159
^
154
-
names-defaults-neg.scala:147: warning: type-checking the invocation of method f checks if the named argument expression 'x = ...' is a valid assignment
160
+
names-defaults-neg.scala:151: warning: type-checking the invocation of method f checks if the named argument expression 'x = ...' is a valid assignment
155
161
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.
156
162
object t6 { var x = t.f(x = 1) }
157
163
^
158
-
names-defaults-neg.scala:150: error: variable definition needs type because 'x' is used as a named argument in its body.
164
+
names-defaults-neg.scala:154: error: variable definition needs type because 'x' is used as a named argument in its body.
159
165
class t9 { var x = t.f(x = 1) }
160
166
^
161
-
names-defaults-neg.scala:150: warning: type-checking the invocation of method f checks if the named argument expression 'x = ...' is a valid assignment
167
+
names-defaults-neg.scala:154: warning: type-checking the invocation of method f checks if the named argument expression 'x = ...' is a valid assignment
162
168
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.
163
169
class t9 { var x = t.f(x = 1) }
164
170
^
165
-
names-defaults-neg.scala:164: error: variable definition needs type because 'x' is used as a named argument in its body.
171
+
names-defaults-neg.scala:168: error: variable definition needs type because 'x' is used as a named argument in its body.
166
172
def u3 { var x = u.f(x = 1) }
167
173
^
168
-
names-defaults-neg.scala:167: error: variable definition needs type because 'x' is used as a named argument in its body.
174
+
names-defaults-neg.scala:171: error: variable definition needs type because 'x' is used as a named argument in its body.
169
175
def u6 { var x = u.f(x = "32") }
170
176
^
171
-
names-defaults-neg.scala:170: error: reference to x is ambiguous; it is both a method parameter and a variable in scope.
177
+
names-defaults-neg.scala:174: error: reference to x is ambiguous; it is both a method parameter and a variable in scope.
172
178
def u9 { var x: Int = u.f(x = 1) }
173
179
^
174
-
names-defaults-neg.scala:177: error: variable definition needs type because 'x' is used as a named argument in its body.
180
+
names-defaults-neg.scala:181: error: variable definition needs type because 'x' is used as a named argument in its body.
175
181
class u15 { var x = u.f(x = 1) }
176
182
^
177
-
names-defaults-neg.scala:177: warning: type-checking the invocation of method f checks if the named argument expression 'x = ...' is a valid assignment
183
+
names-defaults-neg.scala:181: warning: type-checking the invocation of method f checks if the named argument expression 'x = ...' is a valid assignment
178
184
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.
179
185
class u15 { var x = u.f(x = 1) }
180
186
^
181
-
names-defaults-neg.scala:180: error: reference to x is ambiguous; it is both a method parameter and a variable in scope.
187
+
names-defaults-neg.scala:184: error: reference to x is ambiguous; it is both a method parameter and a variable in scope.
0 commit comments