Skip to content

Failure to search for implicit type tag inside ~ of macro #4493

@nicolasstucki

Description

@nicolasstucki

Both

class Index[K]
object Index {
  inline def succ[K]: Unit = ~{
    implicit val k = '[K]
    '(new Index[K])
  }
}
class Index[K]
object Index {
  inline def succ[K]: Unit = ~{
    '(new Index[K])
  }
}

fail with

Exception in thread "main" java.lang.AssertionError: assertion failed: unresolved symbols: type K when pickling tests/run/tasty-indexed-map/quoted_1.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:404)
	at dotty.tools.dotc.transform.ReifyQuotes$Reifier.quotation(ReifyQuotes.scala:389)
	....

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions