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
Not sure if it should be in a separate issue, but this version:
valmap:implicit (A:Type,B:Type,F:Type1,fun:Functor[F.T]) => (F.T[A.T]) => (A.T=>B.T) =>F.T[B.T] =implicit (A:Type,B:Type,F:Type1,fun:Functor[F.T]) => x => f => fun.map(x)(f)
crashes the compiler with:
java.lang.Error: internal error: cannot turn method type (implicit A: Type, B: Type, F: Type1, fun: Functor[F.T]):
<error missing parameter type
The argument types of an anonymous function must be fully known. (SLS 8.5)
Expected type: ?
Missing type for parameter x>
=> Any => Any => F.T[Any] into closure
because it has internal parameter dependencies,
position = <1409..1409>, raw type = MethodType(List(A, B, F, fun), ...
The text was updated successfully, but these errors were encountered:
@anatoliykmetyuk why is the test you added an error? The parameter types should be correctly inferred, since the full expected type is provided. Shouldn't an issue be open about that?
It does not work even when we fully specify the types of the givens:
valmap: (A:Type,B:Type,F:Type1) ?=> (Functor[F.T]) ?=> (F.T[A.T]) => (A.T=>B.T) =>F.T[B.T] =
(A:Type,B:Type,F:Type1) ?=> (fun:Functor[F.T]) ?=> x => f => fun.map(x)(f)
@anatoliykmetyuk why is the test you added an error? The parameter types should be correctly inferred, since the full expected type is provided. Shouldn't an issue be open about that? It does not work even when we fully specify the types of the givens:
The issue was a bug in the comiler internals which is fixed. If you want better inference create another issue for it. Though we might already have some issues that cover this.
Discovered in #2500 (comment). This code:
crashes the compiler with:
Not sure if it should be in a separate issue, but this version:
crashes the compiler with:
The text was updated successfully, but these errors were encountered: