Lokale Variablen müssen bei Überladung beachtet werden #64
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#64
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?
OverloadingTIMain.jav:
import java.util.Vector;
import java.util.Stack;
class OverloadingTIMain {
void main() {
var v;
new O1().mm(v);
}
}
mit O1.java:
import java.util.Vector;
import java.util.Stack;
public class O1 {
}
liefert
class OverloadingTIMain {
void main()({
TPH K v;
(new O1().mm((v)::TPH K))::TPH M;
return;
})::TPH O
OverloadingTIMain()({
super(());
})::TPH R
RESULT Final: [
[(TPH L = java.util.Vector), (TPH M = java.lang.String), (TPH N = O1), (TPH MDI, TPH MDH), (TPH K = java.util.Vector)],
[(TPH L = java.util.Stack), (TPH N = O1), (TPH MDK, TPH MDJ), (TPH K = ? extends java.util.Stack), (TPH M = java.lang.String)]]
Es wird aber nur eine Methode main generiert:
Da ist offen welchen Typ K hat. Dies ist aber eintscheidend für die ausgewählte Methode aus O1.