Falscher Konstruktortyp #57
Labels
No Label
Codegen
confirmed
duplicate
Eclipse-Plugin
Feature Request
generics
in progress
invalid
JavaCompilerCore
needs info
Parser
Trash
Type
Unify
won't fix
works for me
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: JavaTX/JavaCompilerCore#57
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Für
import java.util.Vector;
import java.lang.Integer;
public class mathStruc {
model;
}
und
//package de.test;
import java.util.Vector;
import java.lang.Integer;
import java.lang.Boolean;
import mathStruc;
import vectorAdd;
public class mathStrucVector {
public main() {
Vector v1 = new Vector();
v1.addElement(2);
v1.addElement(2);
Vector v2 = new Vector();
v2.addElement(3);
v2.addElement(3);
}
}
wird folgneder Bytecode erzeugt
public void main();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=6, args_size=1
0: new #12 // class java/util/Vector
3: dup
4: invokespecial #13 // Method java/util/Vector."":()V
7: astore_1
8: aload_1
9: iconst_2
10: invokestatic #19 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
13: invokevirtual #23 // Method java/util/Vector.addElement:(Ljava/lang/Object;)V
16: aload_1
17: iconst_2
18: invokestatic #19 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
21: invokevirtual #23 // Method java/util/Vector.addElement:(Ljava/lang/Object;)V
24: new #12 // class java/util/Vector
27: dup
28: invokespecial #13 // Method java/util/Vector."":()V
31: astore_2
32: aload_2
33: iconst_3
34: invokestatic #19 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
37: invokevirtual #23 // Method java/util/Vector.addElement:(Ljava/lang/Object;)V
40: aload_2
41: iconst_3
42: invokestatic #19 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
45: invokevirtual #23 // Method java/util/Vector.addElement:(Ljava/lang/Object;)V
48: new #25 // class vectorAdd
51: dup
52: invokespecial #26 // Method vectorAdd."":()V
55: astore_3
56: new #28 // class mathStruc
59: dup
60: aload_1
61: invokespecial #31 // Method mathStruc."":(Ljava/util/Vector;)V
64: astore 4
66: new #28 // class mathStruc
69: dup
70: aload_2
71: invokespecial #31 // Method mathStruc."":(Ljava/util/Vector;)V
74: astore 5
76: return
}
In Zeile 61 und 71 müsste
61: invokespecial #25 // Method mathStruc."":(Ljava/lang/Object;)V
stehen