我有一个简单的测试宏,它使用了reify。它在宏扩展期间导致StackOverflowError。实现宏扩展期间的StackOverflowError
def test() = macro testimpl
def testimpl(c:Context)():c.Expr[Any] = {
import c.universe._
val o = reify { // StackOverflowError here
object O
O
}
o
}
为什么会发生这种情况?可以以某种方式避免吗?
编辑:这是M6发生的事情。我只是M7尝试过了,现在它说
实施限制:不能具体化类型对象{DEF():O.type}(ClassInfoType)
这样回答为什么的问题,但是否有办法解决这个问题仍然存在问题。