File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/main/scala/scala/async/internal Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,14 @@ private[async] trait AsyncMacro
3737 // Eat it too : (domain specific errors like "unsupported use of await"
3838 //
3939 // TODO roll this idea back into scala/scala
40- def suppress (globalOrAnalzer : Any ) = {
41- type Suppress = { def suppressMacroExpansion (a : Object ): Object }
42- globalOrAnalzer.asInstanceOf [Suppress ].suppressMacroExpansion(macroApplication)
43- }
40+
41+ import global .Tree
42+ type Suppress = { def suppressMacroExpansion (a : Tree ): Tree }
4443 try {
45- suppress( global) // 2.10.x
44+ global. asInstanceOf [ Suppress ].suppressMacroExpansion(macroApplication)
4645 } catch {
4746 case _ : NoSuchMethodException =>
48- suppress( global.analyzer) // 2.11
47+ global.analyzer. asInstanceOf [ Suppress ].suppressMacroExpansion(macroApplication)
4948 }
5049 }
5150
You can’t perform that action at this time.
0 commit comments