Files
kotlin/compiler/testData/codegen/boxWithJava/secondaryConstructors/withGenerics/WithGenerics.java
Denis Zharkov e65382e6ec Support secondary constructors in JVM backend
There is a lot of changes about closures calculating and generating.

1. As classes can have more than one constructor each of them should
have closure arguments.

2. Captured variables set is the same for all of them.

3. Within constructors bodies/delegating calls closure parameters
should be accessed through method arguments because fields may be
not initialized yet.
2015-03-11 17:45:27 +03:00

12 lines
249 B
Java

class WithGenerics {
public static String foo1() {
A<Double> x = new A<Double>("OK");
return x.toString();
}
public static String foo2() {
A<Integer> x = new A<Integer>(123);
return x.toString();
}
}