Change to star projection: do not suggest when type paramer is generic type
#KT-30794 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
10e42a55c9
commit
3742993dea
@@ -0,0 +1,4 @@
|
||||
// "Change type arguments to <*>" "false"
|
||||
// ACTION: Convert to block body
|
||||
// ACTION: Introduce local variable
|
||||
fun <T> test(list: List<*>): List<T> = list as List<T><caret>
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Change type arguments to <*>" "false"
|
||||
fun <T> test(list: List<*>): List<T> {
|
||||
return list as List<T><caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Change type arguments to <*>" "true"
|
||||
fun <T> test(list: List<*>): List<*> {
|
||||
return list as List<T><caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Change type arguments to <*>" "true"
|
||||
fun <T> test(list: List<*>): List<*> {
|
||||
return list as List<*><caret>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Change type arguments to <*>" "true"
|
||||
fun <T> test(list: List<*>): List<T> {
|
||||
list as List<T><caret>
|
||||
return list as List<T>
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Change type arguments to <*>" "true"
|
||||
fun <T> test(list: List<*>): List<T> {
|
||||
list as List<*><caret>
|
||||
return list as List<T>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Change type arguments to <*>" "false"
|
||||
fun <T> test(list: List<*>) {
|
||||
val a: List<T> = list as List<T><caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Change type arguments to <*>" "true"
|
||||
fun <T> test6(list: List<*>) {
|
||||
val a: List<*> = list as List<T><caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Change type arguments to <*>" "true"
|
||||
fun <T> test6(list: List<*>) {
|
||||
val a: List<*> = list as List<*><caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Change type arguments to <*>" "true"
|
||||
fun <T> test7(list: List<*>) {
|
||||
val a = list as List<T><caret>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// "Change type arguments to <*>" "true"
|
||||
fun <T> test7(list: List<*>) {
|
||||
val a = list as List<*><caret>
|
||||
}
|
||||
Reference in New Issue
Block a user