PrintJavaCode in PostIncExpr fixed

This commit is contained in:
JanUlrich 2014-08-14 12:25:58 +02:00
parent e7034f82ce
commit d39aecff4d
3 changed files with 34 additions and 21 deletions

View File

@ -180,8 +180,10 @@ public class PostIncExpr extends UnaryExpr
@Override @Override
public JavaCodeResult printJavaCode(ResultSet resultSet) { public JavaCodeResult printJavaCode(ResultSet resultSet) {
// TODO Auto-generated method stub JavaCodeResult ret = new JavaCodeResult();
return null; ret.attach(this.expr.printJavaCode(resultSet));
ret.attach("++");
return ret;
} }
@Override @Override

View File

@ -91,6 +91,7 @@ public class RefType extends Type implements IMatchable
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += super.hashCode();
hash += this.name.hashCode();//Nur den Name hashen. Sorgt für langsame, aber funktionierende HashMaps hash += this.name.hashCode();//Nur den Name hashen. Sorgt für langsame, aber funktionierende HashMaps
return hash; return hash;
} }

View File

@ -2,24 +2,34 @@ import java.util.Vector;
class Matrix extends Vector<Vector<Integer>> { class Matrix extends Vector<Vector<Integer>> {
mvmul(Test v) { Matrix mul(m){
i; Vector<Vector<Integer>> ret;
ele; ret = new Matrix();
v.add(i); i;
return this; i = 0;
while(i < this.size()) {
v1;
v2;
v1 = this.elementAt(i);
v2 = new Vector<Integer>();
j;
j = 0;
while(j < v1.size()) {
erg;
erg = 0;
k;
k = 0;
while(k < v1.size()) {
erg = erg + v1.elementAt(k).intValue() * m.elementAt(k).elementAt(j).intValue();
k++;
}
v2.addElement(new Integer(erg));
j++;
}
ret.addElement(v2);
i++;
}
return ret;
} }
}
class Test{
void add(Integer i){
} }
elementAt(Integer i){
return 1;
}
size(){
return 1;
}
}