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

"macro not expanded" error with argument containing implicit view, inferred Nothing #7987

Closed
scabug opened this issue Nov 21, 2013 · 2 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Nov 21, 2013

scala> import scala.language.experimental._
import scala.language.experimental._

scala> object Macro {
     |   def apply[A](a: A): A = macro impl[A]
     |   def impl[A](c: reflect.macros.Context)(a: c.Expr[A]): c.Expr[A] = a
     | }
defined module Macro

scala>

scala> class C[T] {
     |   def foo = 0
     | }
defined class C

scala> implicit def AnyToC[T](a: Any): C[T] = new C[T]
warning: there were 1 feature warning(s); re-run with -feature for details
AnyToC: [T](a: Any)C[T]

scala> Macro {
     |   "".foo
     |    ()
     | }
<console>:17: error: macro has not been expanded
              Macro {
              ^
@scabug
Copy link
Author

scabug commented Nov 21, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7987?orig=1
Reporter: @retronym
Affected Versions: 2.10.3

@scabug
Copy link
Author

scabug commented Nov 21, 2013

@retronym said:
Already fixed in 2.11.0-M7. Test case and explanation: scala/scala#3172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants