Skip to content

Class tag fails to be generated for a type argument of an implicit conversion #7608

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

Open
scabug opened this issue Jun 25, 2013 · 1 comment
Milestone

Comments

@scabug
Copy link

scabug commented Jun 25, 2013

object Test extends App {
  class C
  implicit def conv[T <: C : scala.reflect.ClassTag](name: String): T = ???
  def foo(c: C) = ???
  foo("test")
}
00:14 ~/Projects/210x/sandbox (2.10.x)$ st
[[syntax trees at end of                     typer]] // Test.scala
package <empty> {
  object Test extends AnyRef with App {
    def <init>(): Test.type = {
      Test.super.<init>();
      ()
    };
    class C extends scala.AnyRef {
      def <init>(): Test.C = {
        C.super.<init>();
        ()
      }
    };
    implicit def conv[T >: Nothing <: Test.C](name: String)(implicit evidence$1: scala.reflect.ClassTag[T]): T = scala.this.Predef.???;
    def foo(c: Test.C): Nothing = scala.this.Predef.???;
    Test.this.foo(Test.this.conv[T]("test")(`package`.this.materializeClassTag[T]()))
  }
}

Test.scala:5: error: macro has not been expanded
  foo("test")
      ^
one error found
@scabug
Copy link
Author

scabug commented Jun 25, 2013

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

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

2 participants