Compilation issue when accessing parameter value in Scala macro
问题 The calling code for this minimal example appears to compile (Eclipse Indigo SR2, Scala v2.10.20), but the project containing the calling code is marked with a red cross (not clear to me how to get further diagnostics for this). No class files are generated. If I replace param.value with some literal e.g. 1, the calling code compiles. Is this a known problem? Is there a workaround? def myMacro( param : Int ): Int = macro myMacroImpl( param ) def myMacroImpl(c: Context)(param: c.Expr[Int]): c