From 788ddb2bcc1066cd07d13b3cea1746969f7aeea3 Mon Sep 17 00:00:00 2001 From: Fayez Abu Alia Date: Thu, 25 Oct 2018 12:41:26 +0200 Subject: [PATCH] modified: src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java modified: test/bytecode/javFiles/Field.jav Field-Test funktioniert --- src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java | 2 +- test/bytecode/javFiles/Field.jav | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java b/src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java index ea3b3f30..50ff9b0d 100644 --- a/src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java +++ b/src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java @@ -1265,7 +1265,7 @@ public class BytecodeGenMethod implements StatementVisitor { this.rightSideTemp.accept(this); System.out.println("Receiver = " + 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 diff --git a/test/bytecode/javFiles/Field.jav b/test/bytecode/javFiles/Field.jav index 970cbe2f..b19b2308 100644 --- a/test/bytecode/javFiles/Field.jav +++ b/test/bytecode/javFiles/Field.jav @@ -1,7 +1,7 @@ import java.lang.Integer; public class Field { - x = 5; + public Integer x = 5; m(){ return x;