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
Error:(35, 13) value squashWith is not a member of Int/T, but could be made available as an extension method.
The following importmightfixtheproblem:importItem.extension_squashWith_Int.squashWith
println(5 squashWith List(Item(1), Item(2)))
Expectation
Should work. Moreover, if the wildcard is hidden by a type-alias it compiles and works:
typeXa[A] =AimportItem.{givenXa[?]} // works now
Motivation
Given import imports givens based on their compatibility with the given type, naturally all types are compatible with the wildcard type, as evidenced by Xa[?] working correctly - it may even be more natural to write than given _ if you look at it from the point of view of syntactical consistency – although I do not advocate for replacement of given _ with given ?.
The text was updated successfully, but these errors were encountered:
Minimized code
Output
Expectation
Should work. Moreover, if the wildcard is hidden by a type-alias it compiles and works:
Motivation
Given import imports givens based on their compatibility with the given type, naturally all types are compatible with the wildcard type, as evidenced by
Xa[?]
working correctly - it may even be more natural to write thangiven _
if you look at it from the point of view of syntactical consistency – although I do not advocate for replacement ofgiven _
withgiven ?
.The text was updated successfully, but these errors were encountered: