modified: src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java

modified:   test/bytecode/javFiles/Field.jav
Field-Test funktioniert
This commit is contained in:
Fayez Abu Alia 2018-10-25 12:41:26 +02:00
parent de08e5830d
commit 788ddb2bcc
2 changed files with 2 additions and 2 deletions

View File

@ -1265,7 +1265,7 @@ public class BytecodeGenMethod implements StatementVisitor {
this.rightSideTemp.accept(this); this.rightSideTemp.accept(this);
System.out.println("Receiver = " + getResolvedType(assignLeftSide.field.receiver.getType())); System.out.println("Receiver = " + getResolvedType(assignLeftSide.field.receiver.getType()));
mv.visitFieldInsn(Opcodes.PUTFIELD, getResolvedType(assignLeftSide.field.receiver.getType()), mv.visitFieldInsn(Opcodes.PUTFIELD, getResolvedType(assignLeftSide.field.receiver.getType()),
assignLeftSide.field.fieldVarName, getResolvedType(assignLeftSide.field.getType())); assignLeftSide.field.fieldVarName, "L"+getResolvedType(assignLeftSide.field.getType())+";");
} }
@Override @Override

View File

@ -1,7 +1,7 @@
import java.lang.Integer; import java.lang.Integer;
public class Field { public class Field {
x = 5; public Integer x = 5;
m(){ m(){
return x; return x;