Scala Programming Language
  1. Scala Programming Language
  2. SI-7686

tag generation fails weirdly for higher-kinded types

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Reflection
    • Labels:
      None

      Description

      import scala.reflect.runtime.universe._
      
      object Test extends App {
        def test[B[_]](implicit tt: TypeTag[B[_]]) = ???
        test[Option]
      }
      
      17:26 ~/Projects/210x/sandbox (2.10.x)$ s -Yreify-debug
      reifying = Option[_]
      universe = scala.reflect.runtime.`package`.universe
      mirror = <empty>
      ExistentialType(List(newTypeName("_$1")), TypeRef(ThisType(scala), scala.Option, List(TypeRef(NoPrefix, newTypeName("_$1"), List()))))
      tough type: Option[_] (ExistentialType)
      Sym def: type _$1 (type)
      Sym def: value tt (value)
      Locatable: method test (method) owned by object Test (module class) at Test
      TypeRef(ThisType(scala), scala.Option, List(TypeRef(NoPrefix, newTypeName("_$1"), List())))
      ThisType(scala)
      TypeRef(NoPrefix, newTypeName("_$1"), List())
      NoPrefix
      Filling in: value tt (value)
      TypeRef(SingleType(SingleType(SingleType(SingleType(SingleType(ThisType(<root>), scala), scala.reflect), scala.reflect.runtime), scala.reflect.runtime.package), newTermName("universe")), newTypeName("TypeTag"), List(ExistentialType(List(newTypeName("_$1")), TypeRef(NoPrefix, newTypeName("B"), List(TypeRef(NoPrefix, newTypeName("_$1"), List()))))))
      SingleType(SingleType(SingleType(SingleType(SingleType(ThisType(<root>), scala), scala.reflect), scala.reflect.runtime), scala.reflect.runtime.package), newTermName("universe"))
      SingleType(SingleType(SingleType(SingleType(ThisType(<root>), scala), scala.reflect), scala.reflect.runtime), scala.reflect.runtime.package)
      SingleType(SingleType(SingleType(ThisType(<root>), scala), scala.reflect), scala.reflect.runtime)
      SingleType(SingleType(ThisType(<root>), scala), scala.reflect)
      SingleType(ThisType(<root>), scala)
      ThisType(<root>)
      Locatable: value universe (getter) owned by package package (package object class) at scala.reflect.runtime.package
      Locatable: trait TypeTag (trait) owned by trait TypeTags (trait) at scala.reflect.api.TypeTags
      ExistentialType(List(newTypeName("_$1")), TypeRef(NoPrefix, newTypeName("B"), List(TypeRef(NoPrefix, newTypeName("_$1"), List()))))
      tough type: B[_] (ExistentialType)
      TypeRef(NoPrefix, newTypeName("B"), List(TypeRef(NoPrefix, newTypeName("_$1"), List())))
      splicing B[_$1]
      launching implicit search for scala.reflect.runtime.`package`.universe.TypeTag[B[_$1]]
      implicit search was fruitless
      trying to splice as manifest
      no manifest in scope
      Test.scala:7: error: No TypeTag available for Option[_]
        test[Option]
            ^
      one error found
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Eugene Burmako
            Reporter:
            Eugene Burmako
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development