在添加运行时混入时,return this返回混入的类型,而不是混入的类,即使设置方法的返回类型也不会强制转换,而是抛出错误。如何从混入方法中执行return this?
return this
发布于 2013-06-06 17:12:34
您可以使用metaClass.owner而不是this。
metaClass.owner
this
https://stackoverflow.com/questions/16954944
相似问题