Details

      Description

      trait Foo[C[_]]
      
      object Test extends App {
        import scala.reflect.runtime.universe._
        typeTag[Foo[({type l[X] = (Int, X)})#l]]
      }
      
      C:\Projects\Kepler\sandbox @ topic/dont-unexpand-macros>scalac -Xlog-implicits Test.scala
      materializing requested reflect.runtime.universe.type.TypeTag[Foo[[X](Int, X)]] using `package`.this.materializeTypeTag[Foo[[X](Int, X)]](scala.reflect.runtime.`package`.universe)
      materializing requested reflect.runtime.universe.type.TypeTag[X] using `package`.this.materializeTypeTag[X](scala.reflect.runtime.`package`.universe)
      Test.scala:5: `package`.this.materializeTypeTag[Foo[[X](Int, X)]](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[Foo[[X](Int, X)]] because:
      failed to typecheck the materialized tag:
      cannot reify TypeTag having unresolved type parameter X
        typeTag[Foo[({type l[X] = (Int, X)})#l]]
               ^
      Test.scala:5: error: No TypeTag available for Foo[[X](Int, X)]
        typeTag[Foo[({type l[X] = (Int, X)})#l]]
               ^
      one error found
      

        Activity

        Hide
        Eugene Burmako added a comment -

        Strictly speaking X is indeed a type parameter, however here it's used as an existential skolem, and we do allow existentials in ground type tags.

        Show
        Eugene Burmako added a comment - Strictly speaking X is indeed a type parameter, however here it's used as an existential skolem, and we do allow existentials in ground type tags.
        Show
        Eugene Burmako added a comment - http://groups.google.com/group/scala-language/browse_thread/thread/ef15e9060aa012e2
        Hide
        Mark Harrah added a comment -

        This is essentially SI-2915, except it is for TypeTags instead of Manifests.

        Show
        Mark Harrah added a comment - This is essentially SI-2915 , except it is for TypeTags instead of Manifests.
        Hide
        Mark Harrah added a comment -

        Also, SI-5754.

        Show
        Mark Harrah added a comment - Also, SI-5754 .
        Hide
        Adriaan Moors added a comment -

        Are we really planning to fix this in 2.10.1? What's the plan?

        Show
        Adriaan Moors added a comment - Are we really planning to fix this in 2.10.1? What's the plan?
        Hide
        Eugene Burmako added a comment -

        That was one of the bugs Mark mentioned back then in an email about annoying macro issues. I was intending to give it a second look and then either close it or fix it by 2.10.1.

        Show
        Eugene Burmako added a comment - That was one of the bugs Mark mentioned back then in an email about annoying macro issues. I was intending to give it a second look and then either close it or fix it by 2.10.1.
        Hide
        Mark Harrah added a comment -

        Although I think it would make maintaining and reading the code I have now easier, this one isn't a blocker for me and I'd be ok with this being fixed in 2.11.

        SI-6539 (implemented, need it in a release), SI-6812, and SI-6187 are my blockers.

        Show
        Mark Harrah added a comment - Although I think it would make maintaining and reading the code I have now easier, this one isn't a blocker for me and I'd be ok with this being fixed in 2.11. SI-6539 (implemented, need it in a release), SI-6812 , and SI-6187 are my blockers.
        Show
        Eugene Burmako added a comment - https://github.com/scala/scala/pull/2084

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development