JavaTXCompilerInJavaTX/resources/syntaxtreegenerator/Instanceof.ast

44 lines
715 B
Plaintext
Raw Normal View History

class Instanceof {
Instanceof(){
super(());
}
void checkInstanceof(){
TPH a;
a = 4;
return a instanceof java.lang.Integer;
}
void checkInstanceOfWithPattern(){
TPH b;
b = 4.0;
if(b instanceof d)
{
return d;
}
else
{
return Kein Double;
};
}
2023-07-17 17:50:58 +00:00
void checkInstanceOfWithGuardedPattern(){
TPH obj;
obj = test;
TPH flag;
if(obj instanceof s op s.length Signature: [TPH]() op 5)
{
flag = s.contains Signature: [TPH, TPH](jdk);
};
return;
}
java.lang.Boolean equals(java.lang.Object o){
return o instanceof other op x op other.x op y op other.y;
}
Instanceof(){
super(());
}
2023-07-17 17:55:16 +00:00
}