Create From Usage: Add support of star projections/incorrect type arguments
#EA-62661 Fixed
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
|
||||
fun test() = Foo<String>(2, "2")
|
||||
|
||||
class Foo<T>(i: Int, t: T) {
|
||||
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
|
||||
fun test() = <caret>Foo<String, *>(2, "2")
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Create class 'A'" "true"
|
||||
package p
|
||||
|
||||
fun foo(): A<*, String> = throw Throwable("")
|
||||
|
||||
class A<T, U> {
|
||||
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Create class 'A'" "true"
|
||||
package p
|
||||
|
||||
fun foo(): <caret>A<*, String> = throw Throwable("")
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
fun test(): Int {
|
||||
return foo<String>(2, "2")
|
||||
}
|
||||
|
||||
fun <T> foo(i: Int, t: T): Int {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
fun test(): Int {
|
||||
return <caret>foo<String, *>(2, "2")
|
||||
}
|
||||
Reference in New Issue
Block a user