TestTwoArgs #77
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#77
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?
Created attachment 20
Das erwartete Ergebnis
fogg.allConstraints: [Z < P, AH < T, AL < AF, P < AL, AG < P, AP < Z, T < AP]
fogg.posOfTPHs: {P=[PairTphMethod[METHOD,TPH ALid(TPH P)]], T=[PairTphMethod[METHOD,TPH APsetA(TPH T)]], AF=[PairTphMethod[METHOD,TPH AFm(TPH AFTPH Z)], PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], AG=[PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], AH=[PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], Z=[PairTphMethod[METHOD,TPH AFm(TPH AFTPH Z)]], AL=[PairTphMethod[METHOD,TPH ALid(TPH P)], PairTphMethod[METHOD,TPH AFm(TPH AFTPH Z)], PairTphMethod[METHOD,TPH AFmain(TPH AGTPH AH)]], AP=[PairTphMethod[FIELD,null]]}
fogg.classConstraints: [AP < Z, Z < P, P < AL, AL < AF, AF < java/lang/Object]
fogg.methodConstraintsWithPosition: {TPH ALid(TPH P)=[],
TPH AFm(TPH AFTPH Z)=[],
TPH APsetA(TPH T)=[T < AP],
TPH AFmain(TPH AGTPH AH)=[AH < T, AG < P, T < AL, T < P, T < AP, T < Z, T < AF]}
Created attachment 24
Das erwartete Ergebnis (korrgiert für Umbennungen)
fogg.methodConstraintsWithPosition: {
TPH ALid(TPH P)=[AL = AL, P < AL],
ok
TPH AFm(TPH AFTPH Z)=[AF = AF, AL < AF, Z < P, AL = AL, P < AL],
ok
TPH APsetA(TPH T)=[T < AP, AP = AP, AP = AP],
ok
TPH AFmain(TPH AGTPH AH)=[AF = AF, AG < P, AL = AL, AP = AP, AH < T, AP < Z, AF = AF, AL < AF, P < AL, T < AP, Z < AF]}
Z < AF sind class-Constraints, also hier löschen
fogg.classConstraints: [AP < java/lang/Object, AP < Z, Z < P, P < AL, AL < AF, AF < java/lang/Object]
AP < java/lang/Object ist falsch
fogg.methodConstraintsWithPosition: {
TPH ALid(TPH P)=[AL = AL, P < AL],
ok, aber AL < Object fehlt
TPH AFm(TPH AFTPH Z)=[AF = AF, AL < AF, Z < P, AL = AL, P < AL],
ok, aber AF < Object fehlt
TPH APsetA(TPH T)=[T < AP, AP = AP, AP = AP],
ok, aber AP < Object fehlt
TPH AFmain(TPH AGTPH AH)=[AF = AF, AG < P, AL = AL, AP = AP, AH < T, AP < Z, AF = AF, AL < AF, P < AL, T < AP, Z < AF]}
Z < AF sind class-Constraints, also hier löschen
Das sieht jetzt schon ganz gut aus. das Ergebnis wäre
public class TestTwoArgs<T extends AS, AS extends Z, Z extends AN, AN extends AG, AG> {
AS a;
}
Du bekommst:
public class TestTwoArgs<Z extends AN, AG, AN extends AG, AS extends Z> {
public AS a;
public TestTwoArgs();
public
AN id(AN);
public AS setA(T);
public AG m(AG, Z);
public <AI, AN extends AG, AH extends AG> AG main(AH, AI);
}
Es geht noch allgemeiner
public class TestTwoArgs <AS extends Z, Z extends P, P extends AN, AN extends AG, AG>
{
AS
a;
}