Open scabug opened 9 years ago
Imported From: https://issues.scala-lang.org/browse/SI-9421?orig=1 Reporter: @retronym Affected Versions: 2.11.7 See #7243, #8777
@retronym said (edited on Jul 28, 2015 11:39:43 PM UTC): Fixing it would require adding a default case in src/reflect/scala/reflect/internal/Importers.scala importTree that forwards to an extension hook that could be implemented in nsc.Global. This pattern is already used in TreePrinters, see in particular xprinttree
@paulp said: See also #7243.
@retronym said (edited on Sep 10, 2015 1:36:09 PM UTC): I've started to add the extension point to Importers in the last commit here: https://github.com/scala/scala/compare/scala:2.11.x...retronym:topic/ximporter-annotation-completion?expand=1
It wasn't working as I had hoped, I suspect there is an underlying bug in the compiler generating the right bridge methods down the cake for the method I added.
Reminds me a little of aspects of #8777.
As reported by Daniel Armak on the mailing list:
I encountered this error trying to compile code that uses the shapeless ~?> typeclass with the toolbox, and simplified it to this:
This fails with:
Importers doesn't deal with the extra AST node types introduced in nsc.Global, namely
TypeTreeWithDeferredRefCheck