"Change JVM name" (@JvmName) quickfix: improve name suggester for generic functions

#KT-38559 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-04-25 11:14:39 +09:00
committed by Yan Zhulanow
parent 5efbbdea57
commit 6868f53f46
8 changed files with 77 additions and 2 deletions
@@ -0,0 +1,7 @@
// "Add '@JvmName' annotation" "true"
// WITH_RUNTIME
interface Foo<T>
fun Foo<Int>.foo() = this
fun <caret>Foo<String>.foo() = this
@@ -0,0 +1,8 @@
// "Add '@JvmName' annotation" "true"
// WITH_RUNTIME
interface Foo<T>
fun Foo<Int>.foo() = this
@JvmName("fooString")
fun Foo<String>.foo() = this
@@ -0,0 +1,7 @@
// "Add '@JvmName' annotation" "true"
// WITH_RUNTIME
interface Bar<T, U>
fun <caret>Bar<Int, Double>.bar() = this
fun Bar<Int, Bar<Long, Bar<Double, String>>>.bar() = this
@@ -0,0 +1,8 @@
// "Add '@JvmName' annotation" "true"
// WITH_RUNTIME
interface Bar<T, U>
@JvmName("barIntDouble")
fun Bar<Int, Double>.bar() = this
fun Bar<Int, Bar<Long, Bar<Double, String>>>.bar() = this
@@ -0,0 +1,7 @@
// "Add '@JvmName' annotation" "true"
// WITH_RUNTIME
interface Bar<T, U>
fun Bar<Int, Double>.bar() = this
fun <caret>Bar<Int, Bar<Long, Bar<Double, String>>>.bar() = this
@@ -0,0 +1,8 @@
// "Add '@JvmName' annotation" "true"
// WITH_RUNTIME
interface Bar<T, U>
fun Bar<Int, Double>.bar() = this
@JvmName("barIntLongDoubleString")
fun Bar<Int, Bar<Long, Bar<Double, String>>>.bar() = this