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
scala>classW[C[_], A](c: C[A])
defined classW
scala>deff[C[_], A](c: C[A]) =newW(c)
<console>:6:error: kinds of the typearguments (C[_],A) do not conform to the expected kinds of the typeparameters (typeC,typeA) in classW.
C[_]'stypeparametersdo not matchtypeC's expected parameters: typeC has one typeparameter, but typeC (in classW) has one
deff[C[_], A](c: C[A]) =newW(c)
^
<console>:6:error: kinds of the typearguments (C[_],A) do not conform to the expected kinds of the typeparameters (typeC,typeA) in classW.
C[_]'stypeparametersdo not matchtypeC's expected parameters: typeC has one typeparameter, but typeC (in classW) has one
deff[C[_], A](c: C[A]) =newW(c)
^
Specifying type parameters explicitly works:
Making W a case class also works:
Using f in the same context is ok too:
So I guess inference fails only for constructors.
Tested on 2.8.1 and 2.9.0.r24471-b20110317020039
The text was updated successfully, but these errors were encountered: