[e-lang] A solution for overriding __getAllegedType
Kevin Reid
kpreid at mac.com
Fri May 19 16:14:33 EDT 2006
It is sometimes difficult to override __getAllegedType/0
appropriately because there is no way to get the original value in
order to compute a variation of it.
To fix this, I have added ObjectExpr#asTypeDesc/0 to E-on-CL, and I
propose that the same be done for E-on-Java.
That is, the Miranda method is this, except in the presence of matchers:
to __getAllegedType() :any {
return meta.context().getSource().asTypeDesc()
}
For ObjectExprs with fully-qualified names, no matchers, and no
explicit __getAllegedType/0 method, this is true:
? objectExpr.asTypeDesc() == objectExpr.eval
(scope).__getAllegedType()
# value: true
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list