mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-03 05:44:10 -08:00
C: prevent from casting to native function type
This commit is contained in:
parent
ada2bf9c58
commit
08aa642fe5
|
@ -1058,8 +1058,7 @@ public class CodeGenerationVisitor implements ExprVisitor, StatementVisitor {
|
|||
public void visit(CastExpr expr) {
|
||||
if (expr.getTarget() instanceof ValueType.Object) {
|
||||
String className = ((ValueType.Object) expr.getTarget()).getClassName();
|
||||
if (context.getCharacteristics().isStructure(className)
|
||||
|| className.equals(Address.class.getName())) {
|
||||
if (!context.getCharacteristics().isManaged(className)) {
|
||||
expr.getValue().acceptVisitor(this);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user