Create Class from Usage: Use type parameter bounds as supertypes

#KT-15242 Fixed
This commit is contained in:
Alexey Sedunov
2017-07-07 17:40:15 +03:00
parent 95769dc9d3
commit e98af7bfc1
11 changed files with 128 additions and 32 deletions
@@ -0,0 +1,8 @@
// "Create class 'Foo'" "true"
interface I
fun <T : I> foo() {}
fun x() {
foo<<caret>Foo>()
}
@@ -0,0 +1,12 @@
// "Create class 'Foo'" "true"
interface I
fun <T : I> foo() {}
fun x() {
foo<Foo>()
}
class Foo : I {
}
@@ -0,0 +1,9 @@
// "Create class 'Foo'" "true"
open class A
interface I
fun <T : I> foo() where T : A {}
fun x() {
foo<<caret>Foo>()
}
@@ -0,0 +1,13 @@
// "Create class 'Foo'" "true"
open class A
interface I
fun <T : I> foo() where T : A {}
fun x() {
foo<Foo>()
}
class Foo : I, A() {
}