modified: ../../../../../resources/insertGenericsJav/TestTwoArgs.jav

Ergebnisse als Kommentare eingefuegt.
This commit is contained in:
pl@gohorb.ba-horb.de 2023-02-13 18:39:16 +01:00
parent 29f654279b
commit 60d5da6f24

View File

@ -1,21 +1,26 @@
public class TestTwoArgs { public class TestTwoArgs {
//A
a; a;
//<A1> A1 -> A1
id(b) { id(b) {
var c = b; var c = b;
return c; return c;
} }
//<B extends A> B -> A
setA(x) { setA(x) {
a = x; a = x;
return a; return a;
} }
//<C, D extends C> (C,D) -> C
m(x,y) { m(x,y) {
x = id(y); x = id(y);
return x; return x;
} }
//<E, F extends A> (E, F) -> E
main(x,y) { main(x,y) {
return m(id(x),setA(y)); return m(id(x),setA(y));
} }