Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag generation fails weirdly for higher-kinded types #7686

Closed
scabug opened this issue Jul 22, 2013 · 2 comments
Closed

tag generation fails weirdly for higher-kinded types #7686

scabug opened this issue Jul 22, 2013 · 2 comments
Milestone

Comments

@scabug
Copy link

scabug commented Jul 22, 2013

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
@scabug
Copy link
Author

scabug commented Jul 22, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7686?orig=1
Reporter: @xeno-by

@scabug scabug added this to the Backlog milestone Apr 7, 2017
hrhino added a commit to hrhino/scala that referenced this issue Jan 1, 2020
I nearly resolved to clear the scala/bug backlog this year.

Fixes scala/bug#3899
Fixes scala/bug#7686
Fixes scala/bug#9668
hrhino added a commit to hrhino/scala that referenced this issue Jan 7, 2020
I nearly resolved to clear the scala/bug backlog this year.

Fixes scala/bug#3899
Fixes scala/bug#7686

The test case for scala/bug#3899 was contributed oh so many years ago by retronym, so this is

Co-Authored-By: "Jason Zaugg" <jzaugg@gmail.com>
@lrytz
Copy link
Member

lrytz commented Jan 9, 2020

Test in scala/scala#8620

@lrytz lrytz closed this as completed Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants