Skip to content

Crash when pickling buggy macro implementation #4514

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

Closed
nicolasstucki opened this issue May 11, 2018 · 1 comment
Closed

Crash when pickling buggy macro implementation #4514

nicolasstucki opened this issue May 11, 2018 · 1 comment

Comments

@nicolasstucki
Copy link
Contributor

object Foo {
  inline def foo[X](x: X): Unit = ~fooImpl('(x))
  def fooImpl[X: quoted.Type](x: X): quoted.Expr[Unit] = '()
}

Note that this code should have (x: Expr[X]) in fooImpl.

It crashes with:

Exception in thread "main" java.lang.AssertionError: assertion failed: unresolved symbols: type X when pickling Foo.scala
	at scala.Predef$.assert(Predef.scala:219)
	at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:639)
	at dotty.tools.dotc.core.quoted.PickledQuotes$.pickle(PickledQuotes.scala:98)
	at dotty.tools.dotc.core.quoted.PickledQuotes$.pickleQuote(PickledQuotes.scala:31)
	at dotty.tools.dotc.transform.ReifyQuotes$Reifier.pickleAsTasty$1(ReifyQuotes.scala:401)
	at dotty.tools.dotc.transform.ReifyQuotes$Reifier.pickledQuote(ReifyQuotes.scala:416)
	at dotty.tools.dotc.transform.ReifyQuotes$Reifier.quotation(ReifyQuotes.scala:389)
	at dotty.tools.dotc.transform.ReifyQuotes$Reifier.$anonfun$transform$2(ReifyQuotes.scala:547)
	... 
@nicolasstucki
Copy link
Contributor Author

Possibly caused by #4493

@nicolasstucki nicolasstucki self-assigned this May 11, 2018
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue May 11, 2018
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue May 11, 2018
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

1 participant