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
extension (s: String) defx(i: Int):Int= i
valx="".x
Output
value x is not a member of String.
An extension method was tried, but could not be fully constructed:
{
def $anonfun(i: Int): Int = x("")(i)
closure($anonfun)
}
Expectation
"".x should evaluate into a lambda just like it works for old style extensions using implicit classes:
implicitclassStrOps(s: String) {
defx(i: Int):Int= i
}
valx="".x
Minimized code
Output
Expectation
"".x
should evaluate into a lambda just like it works for old style extensions using implicit classes:results with
The text was updated successfully, but these errors were encountered: