[FIR] Introduce WRONG_NUMBER_OF_TYPE_ARGUMENTS diagnostic
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ interface B1<T : B0<*>>
|
||||
interface AA<T: AA<*>>
|
||||
interface BB<S : List<AA<*>>>
|
||||
|
||||
interface A<T: <!OTHER_ERROR!>List<T, T, T><!>>
|
||||
interface A<T: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>List<T, T, T><!>>
|
||||
|
||||
class X<Y>
|
||||
class D<T : X<in X<out X<T>>>>
|
||||
@@ -32,5 +32,5 @@ fun test() {
|
||||
fun <T: <!OTHER_ERROR!>Foo<String.Bar><!>> x() {}
|
||||
fun Foo<String>.Bar.ext() {}
|
||||
|
||||
fun ex1(a: <!OTHER_ERROR!>Foo<String>.Bar<String><!>): <!OTHER_ERROR!>Foo<String>.Bar<String><!> {
|
||||
fun ex1(a: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Foo<String>.Bar<String><!>): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Foo<String>.Bar<String><!> {
|
||||
}
|
||||
+5
-5
@@ -41,11 +41,11 @@ fun ok5(): test.Outer.Obj.Nested2<A>.Inner5<B> = null!!
|
||||
fun errorTypeWithArguments(): <!OTHER_ERROR!>Q<A>.W<B, C, D>.R.M<!> = null!!
|
||||
|
||||
fun error1(): Outer<A>.Inner<B>.Inner3<C, D> = null!!
|
||||
fun error2(): <!OTHER_ERROR!>Outer<A>.Inner<B, C, D>.Inner2<!> = null!!
|
||||
fun error2(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer<A>.Inner<B, C, D>.Inner2<!> = null!!
|
||||
fun error3(): <!OTHER_ERROR!>Outer.Inner<A, B>.Inner3<C><!> = null!!
|
||||
|
||||
fun error4(): <!OTHER_ERROR!>Outer<A>.Nested<B>.Inner4<C><!> = null!!
|
||||
fun error5(): <!OTHER_ERROR!>Outer<A>.Obj.Nested2<B>.Inner5<C><!> = null!!
|
||||
fun error6(): <!OTHER_ERROR!>Outer.Obj<A>.Nested2<B>.Inner5<C><!> = null!!
|
||||
fun error4(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer<A>.Nested<B>.Inner4<C><!> = null!!
|
||||
fun error5(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer<A>.Obj.Nested2<B>.Inner5<C><!> = null!!
|
||||
fun error6(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer.Obj<A>.Nested2<B>.Inner5<C><!> = null!!
|
||||
|
||||
fun error7(): <!OTHER_ERROR!>test<String>.Outer.Obj.Nested2<A>.Inner5<B><!> = null!!
|
||||
fun error7(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>test<String>.Outer.Obj.Nested2<A>.Inner5<B><!> = null!!
|
||||
@@ -5,6 +5,6 @@ class OuterClass<T1> {
|
||||
typealias NestedType<T> = NestedClass<T>
|
||||
}
|
||||
|
||||
typealias ON1<T1, T2> = <!OTHER_ERROR!>OuterClass<T1>.NestedClass<T2><!>
|
||||
typealias ON1<T1, T2> = <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>OuterClass<T1>.NestedClass<T2><!>
|
||||
typealias ON2<T1, T2> = OuterClass<T1>.NestedType<T2>
|
||||
typealias ON3<T2> = OuterClass.NestedType<T2>
|
||||
@@ -46,5 +46,5 @@ interface Test<in I, out O, P> {
|
||||
fun neOk32(i: <!OTHER_ERROR!>Inv<!>)
|
||||
fun neOk33(i: Inv<<!SYNTAX!><!>>)
|
||||
fun neOk34(i: <!OTHER_ERROR!>Inv<C><!>)
|
||||
fun neOk35(i: <!OTHER_ERROR!>Inv<P, P><!>)
|
||||
fun neOk35(i: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Inv<P, P><!>)
|
||||
}
|
||||
@@ -43,5 +43,5 @@ interface Test<in I, out O, P> {
|
||||
var neOk32: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Inv<!>
|
||||
var neOk33: Inv<<!SYNTAX!><!>>
|
||||
var neOk34: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Inv<C><!>
|
||||
var neOk35: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Inv<P, P><!>
|
||||
var neOk35: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS, WRONG_NUMBER_OF_TYPE_ARGUMENTS, WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Inv<P, P><!>
|
||||
}
|
||||
@@ -38,5 +38,5 @@ interface Test<in I, out O, P> {
|
||||
fun neOk32(): <!OTHER_ERROR!>Inv<!>
|
||||
fun neOk33(): Inv<<!SYNTAX!><!>>
|
||||
fun neOk34(): <!OTHER_ERROR!>Inv<C><!>
|
||||
fun neOk35(): <!OTHER_ERROR!>Inv<P, P><!>
|
||||
fun neOk35(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Inv<P, P><!>
|
||||
}
|
||||
Reference in New Issue
Block a user