New J2K: add multi-file conversion tests from old j2k
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package test;
|
||||
|
||||
public class AAA {
|
||||
private int x = 42;
|
||||
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public void setX(int x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
public void foo() {
|
||||
setX(getX() + 1);
|
||||
}
|
||||
|
||||
public void bar(B b) {
|
||||
System.out.println(b.getYY());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// ERROR: Unresolved reference: yy
|
||||
package test
|
||||
|
||||
class AAA {
|
||||
var x = 42
|
||||
|
||||
fun foo() {
|
||||
x = x + 1
|
||||
}
|
||||
|
||||
fun bar(b: B) {
|
||||
println(b.yy)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
public class B {
|
||||
void foo(AAA a) {
|
||||
a.setX(a.getX() + 1);
|
||||
y += "a";
|
||||
}
|
||||
|
||||
private String y = "";
|
||||
|
||||
public String getYY() {
|
||||
return y;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package test
|
||||
|
||||
class B {
|
||||
fun foo(a: AAA) {
|
||||
a.x = a.x + 1
|
||||
yY += "a"
|
||||
}
|
||||
|
||||
var yY = ""
|
||||
private set
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import test.AAA
|
||||
|
||||
fun foo1(a: AAA) {
|
||||
a.setX(a.getX() + 1)
|
||||
}
|
||||
|
||||
fun foo2(a: AAA?) {
|
||||
a?.setX((a?.getX() ?: 0) + 1)
|
||||
}
|
||||
|
||||
fun AAA.foo() {
|
||||
setX(getX() + 1)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import test.AAA
|
||||
|
||||
fun foo1(a: AAA) {
|
||||
a.x = a.x + 1
|
||||
}
|
||||
|
||||
fun foo2(a: AAA?) {
|
||||
a?.x = (a?.x ?: 0) + 1
|
||||
}
|
||||
|
||||
fun AAA.foo() {
|
||||
x = x + 1
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
void foo(AAA a) {
|
||||
a.setX(a.getX() + 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package test;
|
||||
|
||||
class JavaClass {
|
||||
void foo(AAA a) {
|
||||
a.x = a.x + 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user