2019-01-11 13:45:12 +00:00
|
|
|
public class Tph6 {
|
2018-09-19 11:05:00 +00:00
|
|
|
// m(a,b,c){
|
|
|
|
// a = c;
|
|
|
|
// b = c;
|
|
|
|
// return a;
|
|
|
|
// }
|
|
|
|
|
|
|
|
m(x,y){
|
2019-01-11 13:45:12 +00:00
|
|
|
var c = m2(y);
|
|
|
|
c = m2(x);
|
new file: ../../test/bytecode/Tph5Test.java
new file: ../../test/bytecode/javFiles/Tph5.jav
erzeugt Typfehler zur Laufzeit mit
mport java.util.Vector;
public class Tph5Use {
public static void main(String[] args) {
Tph5 tph5 = new Tph5();
Integer i = tph5.<Integer, Integer, Integer, Integer>m(1,2,3);
String s = tph5.<String, String, Integer, Integer>m("xx",2,3);
}
}
2018-08-13 16:19:02 +00:00
|
|
|
}
|
2018-09-19 11:05:00 +00:00
|
|
|
|
|
|
|
m2(y) { return y; }
|
new file: ../../test/bytecode/Tph5Test.java
new file: ../../test/bytecode/javFiles/Tph5.jav
erzeugt Typfehler zur Laufzeit mit
mport java.util.Vector;
public class Tph5Use {
public static void main(String[] args) {
Tph5 tph5 = new Tph5();
Integer i = tph5.<Integer, Integer, Integer, Integer>m(1,2,3);
String s = tph5.<String, String, Integer, Integer>m("xx",2,3);
}
}
2018-08-13 16:19:02 +00:00
|
|
|
}
|