Skip to content

Very verbose error instead of unreducible application #12284

Closed
@scf37

Description

@scf37

Compiler version

3.0.0-RC3

Minimized code

trait I[F[_], A]

def magic[F[_], A](in: I[F, A]): F[A] =
  val deps: Vector[I[F, _]] = ???
  val xx: Vector[F[_]] = deps.map(i => magic(i))
  ???

Output

Inaccessible variables captured in instantation of type variable B.
F[i.A] was fixed to Any,
but the latter type does not conform to the upper bound AppliedType(TypeRef(NoPrefix,type F),List(TypeBounds(TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Nothing),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))))
Inaccessible variables captured in instantation of type variable B.
F[i.A] was fixed to Any,
but the latter type does not conform to the upper bound AppliedType(TypeRef(NoPrefix,type F),List(TypeBounds(TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Nothing),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))))
Inaccessible variables captured in instantation of type variable B.
F[i.A] was fixed to Any,
but the latter type does not conform to the upper bound AppliedType(TypeRef(NoPrefix,type F),List(TypeBounds(TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Nothing),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))))
Inaccessible variables captured in instantation of type variable B.
F[i.A] was fixed to Any,
but the latter type does not conform to the upper bound AppliedType(TypeRef(NoPrefix,type F),List(TypeBounds(TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Nothing),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))))
return type B of lambda cannot be made hygienic;
it is not a supertype of the hygienic type Any

Expectation

I guess it should be

unreducible application of higher-kinded type F to wildcard arguments

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions