Skip to content

typeinfo is error-prone  #475

Open
Open
@OlegYch

Description

@OlegYch

given code like this on "com.softwaremill.magnolia1_3" %% "magnolia" % "1.3.2"

def f[T] = magnolia1.Macro.typeInfo[T]
f[List[Int]]

i get TypeInfo(Playground.f,T,List())
instead this should either not compile or produce TypeInfo(scala.collection.immutable,List,List(TypeInfo(scala,Int,List())))

compare this to TypeTag behaviour on scala2:

type TypeTag[T] = scala.reflect.runtime.universe.TypeTag[T]
def f[T:TypeTag] = implicitly[TypeTag[T]]
f[List[Int]]

correctly returns TypeTag[List[Int]] or doesn't compile if you forget :TypeTag bound

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions