Closed crowlogic closed 8 months ago
the problem is that the LiteralConstant is not casting to the resultType passed in to its generate method
@Override
public MethodVisitor generate(MethodVisitor mv, Class<?> resultType)
{
if (π.equals(fieldName))
{
getStaticField(mv, π);
}
else if (half.equals(fieldName))
{
getStaticField(mv, "half");
}
else
{
// todo: https://github.com/crowlogic/arb4j/issues/222: use the primitive int ,
// the signature of the method being invoked will also have to know this has
// been done and change correspondingly
expression.loadFieldOntoStack(loadThisOntoStack(mv), fieldName, type().descriptorString());
}
if (isResult)
{
expression.setResult(mv, type());
}
return mv;
}