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
37
37
// Eat it too : (domain specific errors like "unsupported use of await"
38
38
//
39
39
// 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 }
44
43
try {
45
- suppress( global) // 2.10.x
44
+ global. asInstanceOf [ Suppress ].suppressMacroExpansion(macroApplication)
46
45
} catch {
47
46
case _ : NoSuchMethodException =>
48
- suppress( global.analyzer) // 2.11
47
+ global.analyzer. asInstanceOf [ Suppress ].suppressMacroExpansion(macroApplication)
49
48
}
50
49
}
51
50
You can’t perform that action at this time.
0 commit comments