forked from JavaTX/JavaCompilerCore
Fehler
This commit is contained in:
parent
1888eb6d46
commit
b32e437a05
@ -155,7 +155,7 @@ public class BytecodeGen implements ASTVisitor {
|
||||
String methDesc = null;
|
||||
|
||||
// Method getModifiers() ?
|
||||
int acc = isInterface?Opcodes.ACC_ABSTRACT:0;
|
||||
int acc = isInterface?Opcodes.ACC_ABSTRACT:method.modifier;
|
||||
|
||||
boolean hasGenInParameterList = genericsAndBounds.containsKey(resultSet.resolveType(method.getReturnType()).resolvedType.acceptTV(new TypeToDescriptor()));
|
||||
if(!hasGenInParameterList) {
|
||||
@ -183,7 +183,7 @@ public class BytecodeGen implements ASTVisitor {
|
||||
System.out.println(sig);
|
||||
NormalMethod meth = new NormalMethod(method,genericsAndBounds,genericsAndBoundsMethod,hasGen);
|
||||
methDesc = meth.accept(new DescriptorToString(resultSet));
|
||||
MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC+acc, method.getName(), methDesc, sig, null);
|
||||
MethodVisitor mv = cw.visitMethod(acc, method.getName(), methDesc, sig, null);
|
||||
|
||||
mv.visitCode();
|
||||
|
||||
|
@ -2,7 +2,7 @@ package bytecode;
|
||||
|
||||
public class ATest extends JavaTXCompilerTest {
|
||||
public ATest() {
|
||||
fileName = "A";
|
||||
fileName = "Example";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
public class Example {
|
||||
|
||||
public m() {
|
||||
String x = "X";
|
||||
public m(Integer x) {
|
||||
// String x = "X";
|
||||
return x;
|
||||
}
|
||||
}
|
13
test/bytecode/For.jav
Normal file
13
test/bytecode/For.jav
Normal file
@ -0,0 +1,13 @@
|
||||
class For{
|
||||
m(Integer x){
|
||||
Boolean b = true;
|
||||
while(x<2){
|
||||
x = x +1;
|
||||
b = false;
|
||||
}
|
||||
return x;
|
||||
// for(int i = 0;i<10;i++) {
|
||||
// x = x + 5;
|
||||
// }
|
||||
}
|
||||
}
|
9
test/bytecode/ForTest.java
Normal file
9
test/bytecode/ForTest.java
Normal file
@ -0,0 +1,9 @@
|
||||
package bytecode;
|
||||
|
||||
public class ForTest extends JavaTXCompilerTest {
|
||||
|
||||
public ForTest() {
|
||||
this.fileName = "For";
|
||||
}
|
||||
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
|
||||
class LamAssign {
|
||||
|
||||
m () {
|
||||
|
Loading…
Reference in New Issue
Block a user