Change Signature: Processing of non-Kotlin usages

#KT-5810 Fixed
 #KT-4187 Fixed
This commit is contained in:
Alexey Sedunov
2014-11-18 21:17:23 +03:00
parent c35c4072c6
commit 1008225116
20 changed files with 324 additions and 39 deletions
@@ -0,0 +1,9 @@
class Foo extends A {
Foo() {
super(2, "abc");
}
void foo() {
new A(1, "abc");
}
}
@@ -0,0 +1,4 @@
open class A(n: Int,
s: String)
class B: A(1, "abc")
@@ -0,0 +1,9 @@
class Foo extends A {
Foo() {
super(2);
}
void foo() {
new A(1);
}
}
@@ -0,0 +1,3 @@
open class A(<caret>n: Int)
class B: A(1)
@@ -0,0 +1,22 @@
class X extends A {
@Override
String foo(int n, String s) {
return "";
}
}
class Y extends X {
@Override
String foo(int n, String s) {
return super.foo(n, s);
}
}
class Test {
void test() {
new A().foo(1, "abc");
new B().foo(2, "abc");
new X().foo(3, "abc");
new Y().foo(4, "abc");
}
}
@@ -0,0 +1,9 @@
open class A {
open fun foo(n: Int,
s: String): String = ""
}
class B: A() {
override fun foo(n: Int,
s: String): String = ""
}
@@ -0,0 +1,22 @@
class X extends A {
@Override
String foo(int n) {
return "";
}
}
class Y extends X {
@Override
String foo(int n) {
return super.foo(n);
}
}
class Test {
void test() {
new A().foo(1);
new B().foo(2);
new X().foo(3);
new Y().foo(4);
}
}
@@ -0,0 +1,7 @@
open class A {
open fun <caret>foo(n: Int): String = ""
}
class B: A() {
override fun foo(n: Int): String = ""
}
@@ -0,0 +1,7 @@
import static _DefaultPackage.bar;
class J {
void test() {
bar(1);
}
}
@@ -0,0 +1 @@
fun bar(n: Int): String = ""
@@ -0,0 +1,7 @@
import static _DefaultPackage.foo;
class J {
void test() {
foo(1);
}
}
@@ -0,0 +1 @@
fun <caret>foo(n: Int): String = ""