Navigation Menu

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

bundles can't be whitebox #8321

Closed
scabug opened this issue Feb 21, 2014 · 5 comments
Closed

bundles can't be whitebox #8321

scabug opened this issue Feb 21, 2014 · 5 comments

Comments

@scabug
Copy link

scabug commented Feb 21, 2014

import scala.reflect.macros.whitebox._
import scala.language.experimental.macros

class Bundle(val c: Context) {
  import c.universe._
  def impl = q"new { val x = 2 }"
}

object Macros {
  def foo: Any = macro Bundle.impl
}
18:53 ~/Projects/Master/sandbox (master)$ ss
Test.scala:2: error: value x is not a member of Any
  println(Macros.foo.x)
                     ^
one error found
@scabug
Copy link
Author

scabug commented Feb 21, 2014

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

@scabug
Copy link
Author

scabug commented Feb 21, 2014

@xeno-by said:
It turns out that there was an error in the blackbox/whitebox check for bundles. It's easy to fix, so I'll submit a pull request this evening. Raising priority to blocker, because this bug essentially destroys bundles as means of implementing whitebox macros.

@scabug
Copy link
Author

scabug commented Feb 21, 2014

@xeno-by said:
scala/scala#3571

@scabug
Copy link
Author

scabug commented Feb 21, 2014

@som-snytt said:
I thought I didn't understand something about bundles.

@scabug
Copy link
Author

scabug commented Feb 21, 2014

@xeno-by said:
I thought I understood something about bundles :(

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