Skip to content

Support any kind-projections with Cross-Quotes (work around Scala 2 limitation) #139

@MateuszKubuszok

Description

@MateuszKubuszok

It seems to be impossible to use kinds projectors with Type.Ctors on Scala 2 using some native compiler logic - what if we offer a workaround?

// replace
Type.Ctor1.of[Either[String, *]]
// with
Type.Ctor2.of[Either]
  .fixLeft[String] // Type.Ctor1[Either[String, *]] which
                   // uses the logic for Type.Ctor2
                   // AND checks if the first param is <:< String on unapply
                   // AND sets it to String on apply

or/and we can try to implement such a logic in the macro - figure out the right type ctor, AND fix all known type params.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:core-libraryImprovement/fix to the core libraryhelp wantedExtra attention is neededholding out for a heroIt's not impossible, but life is too short to do this to oneself for freeissue-type:enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions