Created
June 6, 2014 14:45
-
-
Save xeno-by/8ebb9c5c1ce9c91ad472 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReflectTypechecker { self => | |
type UnaffiliatedMacroContext <: scala.reflect.moved.macros.contexts.Context | |
type MacroContext = UnaffiliatedMacroContext { val universe: self.global.type } | |
def newContext(): MacroContext = new ReflectMacroContext().asInstanceOf[MacroContext] | |
} | |
class CompilerTypechecker extends ReflectTypechecker { | |
override type UnaffiliatedMacroContext = scala.reflect.macros.contexts.Context | |
override def newContext(): MacroContext = new CompilerMacroContext().asInstanceOf[MacroContext] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment