Wildcards werden in der abstrakten Syntax nicht übernommen #229
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#229
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?
branch bytecode2
commit
bd0bfed2cb
import java.util.Vector;
import java.lang.Integer;
import java.lang.Boolean;
Das ungetypte Beispiel
public class Matrix extends Vector<Vector> {
mul(m) {
var ret = new Matrix();
var i = 0;
while(i < size()) {
var v1 = this.elementAt(i);
var v2 = new Vector();
var j = 0;
while(j < v1.size()) {
var erg = 0;
var k = 0;
while(k < v1.size()) {
erg = erg + v1.elementAt(k)
* m.elementAt(k).elementAt(j);
k++; }
v2.addElement(erg);
j++; }
ret.addElement(v2);
i++;
}
return ret;
}
}
erzeugt folgende Signatur
javap -s Matrix.class
Compiled from "Matrix.jav"
public class Matrix extends java.util.Vector {
public Matrix();
descriptor: ()V
public Matrix mul(java.util.Vector<? extends java.util.Vector<? extends java.lang.Integer>>);
descriptor: (Ljava/util/Vector;)LMatrix;
}
import java.util.Vector;
import java.lang.Integer;
import java.lang.Boolean;
public class Matrix extends Vector<Vector> {
Matrix mul(java.util.Vector<? extends java.util.Vector<? extends java.lang.Integer>> m) {
var ret = new Matrix();
var i = 0;
while(i < size()) {
var v1 = this.elementAt(i);
var v2 = new Vector();
var j = 0;
while(j < v1.size()) {
var erg = 0;
var k = 0;
while(k < v1.size()) {
erg = erg + v1.elementAt(k)
* m.elementAt(k).elementAt(j);
k++; }
v2.addElement(erg);
j++; }
ret.addElement(v2);
i++;
}
return ret;
}
}
erzeugt aber
javap -s Matrix.class
Compiled from "Matrix.jav"
public class Matrix extends java.util.Vector {
public Matrix();
descriptor: ()V
public Matrix mul(java.util.Vector);
descriptor: (Ljava/util/Vector;)LMatrix;
}
Die Ausgabe des Parsers ergit:
class Matrix {
Matrix mul(java.util.Vector m)({