Change to star projection: do not suggest when type paramer is generic type

#KT-30794 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-07-21 21:37:18 +09:00
committed by Dmitry Gridin
parent 10e42a55c9
commit 3742993dea
13 changed files with 99 additions and 1 deletions
@@ -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>
}