quickfix to move type constraint to 'where' clause
This commit is contained in:
+5
-3
@@ -14,8 +14,9 @@ class D() {
|
||||
companion object : A(), B {}
|
||||
}
|
||||
|
||||
class Test1<T : A>()
|
||||
class Test1<T>()
|
||||
where
|
||||
T : A,
|
||||
T : B,
|
||||
<error>B</error> : T // error
|
||||
{
|
||||
@@ -41,10 +42,11 @@ class Bar<T : <warning>Foo</warning>>
|
||||
class Buzz<T> where T : <warning>Bar<<error>Int</error>></warning>, T : <error>nioho</error>
|
||||
|
||||
class X<T : <warning>Foo</warning>>
|
||||
class Y<<error>T</error> : <warning>Foo</warning>> where T : <warning>Bar<Foo></warning>
|
||||
class Y<<error>T</error>> where T : <warning>Foo</warning>, T : <warning>Bar<Foo></warning>
|
||||
|
||||
fun <T : A> test2(t : T)
|
||||
fun <T> test2(t : T)
|
||||
where
|
||||
T : A,
|
||||
T : B,
|
||||
<error>B</error> : T
|
||||
{
|
||||
|
||||
@@ -63,3 +63,6 @@ class C {
|
||||
|
||||
fun typed<T>() {
|
||||
}
|
||||
|
||||
fun <T : Cloneable> withTypeParameters() where T : Comparable<T> {
|
||||
}
|
||||
|
||||
@@ -62,3 +62,6 @@ class C {
|
||||
|
||||
fun <T> typed() {
|
||||
}
|
||||
|
||||
fun <T> withTypeParameters() where T : Cloneable, T : Comparable<T> {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Move type parameter constraint to 'where' clause" "true"
|
||||
class A<<caret>T : Cloneable> where T : Comparable<*> {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Move type parameter constraint to 'where' clause" "true"
|
||||
class A<T> where T : Cloneable, T : Comparable<*> {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Move type parameter constraint to 'where' clause" "true"
|
||||
fun <<caret>T : Cloneable> foo() where T : Comparable<*> {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// "Move type parameter constraint to 'where' clause" "true"
|
||||
fun <T> foo() where T : Cloneable, T : Comparable<*> {
|
||||
}
|
||||
Reference in New Issue
Block a user