Create from usage: Support generation of nested Java classes from usages in Kotlin code

This commit is contained in:
Alexey Sedunov
2015-02-19 13:59:14 +03:00
parent 5cd477279b
commit 60d02dab0f
169 changed files with 1452 additions and 40 deletions
@@ -0,0 +1,7 @@
class B<T>{
final T t;
public <U, V> U foo(U u, V v) {
return null;
}
}
@@ -0,0 +1,8 @@
// "Create function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
fun test(): Int {
return b.foo<Int, String>(2, "2")
}
}
@@ -0,0 +1,8 @@
// "Create function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
fun test(): Int {
return b.<caret>foo<Int, String>(2, "2")
}
}
@@ -0,0 +1,9 @@
import org.jetbrains.annotations.NotNull;
class B<T>{
final T t;
public <U> U foo(U u, @NotNull String s) {
return null;
}
}
@@ -0,0 +1,8 @@
// "Create function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
fun test(): Int {
return b.foo<Int>(2, "2")
}
}
@@ -0,0 +1,8 @@
// "Create function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
fun test(): Int {
return b.<caret>foo<Int>(2, "2")
}
}
@@ -0,0 +1,7 @@
class B<T>{
final T t;
public <U, V, W> U foo(V v, W w) {
return null;
}
}
@@ -0,0 +1,8 @@
// "Create function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
fun test(): Int {
return b.foo<Int, String>(2, "2")
}
}
@@ -0,0 +1,8 @@
// "Create function 'foo'" "true"
// ERROR: Unresolved reference: foo
class A<T>(val b: B<T>) {
fun test(): Int {
return b.<caret>foo<T, Int, String>(2, "2")
}
}