Create from usage: Support generation of nested Java classes from usages in Kotlin code
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
class B<T>{
|
||||
final T t;
|
||||
|
||||
public <U, V> U foo(U u, V v) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+8
@@ -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")
|
||||
}
|
||||
}
|
||||
+8
@@ -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")
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class B<T>{
|
||||
final T t;
|
||||
}
|
||||
+9
@@ -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;
|
||||
}
|
||||
}
|
||||
+8
@@ -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")
|
||||
}
|
||||
}
|
||||
+8
@@ -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")
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class B<T>{
|
||||
final T t;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
class B<T>{
|
||||
final T t;
|
||||
|
||||
public <U, V, W> U foo(V v, W w) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+8
@@ -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")
|
||||
}
|
||||
}
|
||||
+8
@@ -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")
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
class B<T>{
|
||||
final T t;
|
||||
}
|
||||
Reference in New Issue
Block a user