[FIR] Ignore failing test, improve DiagnosticKind, fix UPPER_BOUND
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package p
|
||||
|
||||
public fun foo(a: Any) {
|
||||
a is <!OTHER_ERROR!>Map<Int><!>
|
||||
a is Map<Int>
|
||||
a is Map
|
||||
a is Map<out Any?, Any?>
|
||||
a is Map<*, *>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
public fun foo(a: Any, b: <!OTHER_ERROR!>Map<!>) {
|
||||
public fun foo(a: Any, b: Map) {
|
||||
when (a) {
|
||||
is <!OTHER_ERROR!>Map<Int><!> -> {}
|
||||
is Map<Int> -> {}
|
||||
is Map -> {}
|
||||
is Map<out Any?, Any?> -> {}
|
||||
is Map<*, *> -> {}
|
||||
|
||||
+2
-2
@@ -18,11 +18,11 @@ fun <E> foo(x: Any, y: Any) : Any {
|
||||
}
|
||||
|
||||
// bare type
|
||||
if (y is <!OTHER_ERROR!>Outer.Inner<!>) {
|
||||
if (y is <!UNRESOLVED_REFERENCE!>Outer.Inner<!>) {
|
||||
return y
|
||||
}
|
||||
|
||||
y as <!OTHER_ERROR, OTHER_ERROR!>Outer<*>.Inner<!>
|
||||
y as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Outer<*>.Inner<!>
|
||||
|
||||
return C()
|
||||
}
|
||||
|
||||
+5
-5
@@ -51,19 +51,19 @@ interface MessageManager9 : Manager<Message3> {
|
||||
fun <T : Message3> execute4() {}
|
||||
}
|
||||
|
||||
object MessageManager10 : <!OTHER_ERROR!>Message5<Int><!>() {
|
||||
object MessageManager10 : <!UNRESOLVED_REFERENCE!>Message5<Int><!>() {
|
||||
fun <T : Int> execute() {}
|
||||
}
|
||||
|
||||
class MessageManager11<A> : <!OTHER_ERROR!>Message5<Message5<A>><!>() {
|
||||
fun <T : <!OTHER_ERROR!>Message5<A><!>> execute() {}
|
||||
class MessageManager11<A> : <!UNRESOLVED_REFERENCE!>Message5<Message5<A>><!>() {
|
||||
fun <T : <!UNRESOLVED_REFERENCE!>Message5<A><!>> execute() {}
|
||||
}
|
||||
|
||||
data class MessageManager12(val x: Int) : <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Message5<Message2><!>() {
|
||||
data class MessageManager12(val x: Int) : <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Message5<Message2><!>() {
|
||||
fun <T : Message2> execute() {}
|
||||
}
|
||||
|
||||
sealed class MessageManager13<A> : <!OTHER_ERROR!>Message5<A><!>() {
|
||||
sealed class MessageManager13<A> : <!UNRESOLVED_REFERENCE!>Message5<A><!>() {
|
||||
fun <T : A> execute() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ fun test() {
|
||||
a<Foo.Bar<Int>.Baz>()
|
||||
}
|
||||
|
||||
fun <T: <!OTHER_ERROR!>Foo<String.Bar><!>> x() {}
|
||||
fun <T: <!UNRESOLVED_REFERENCE!>Foo<String.Bar><!>> x() {}
|
||||
fun Foo<String>.Bar.ext() {}
|
||||
|
||||
fun ex1(a: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Foo<String>.Bar<String><!>): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Foo<String>.Bar<String><!> {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ class A {
|
||||
|
||||
// Does not work, could be Outer<String>.Inner<Int>
|
||||
// TODO: Should work?
|
||||
fun foo(x: <!OTHER_ERROR!>Inner<Int><!>) {
|
||||
fun foo(x: <!UNRESOLVED_REFERENCE!>Inner<Int><!>) {
|
||||
// Inner<Char>() call use companion as implicit receiver
|
||||
val y: Outer<String>.Inner<Char> = Inner<Char>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ class A {
|
||||
|
||||
// Does not work, could be Outer<String>.Inner<Int>
|
||||
// TODO: Should work?
|
||||
fun foo(x: <!OTHER_ERROR!>Inner<Int><!>) {
|
||||
fun foo(x: <!UNRESOLVED_REFERENCE!>Inner<Int><!>) {
|
||||
// Inner<Char>() call use companion as implicit receiver
|
||||
val y: Outer<String>.Inner<Char> = Inner<Char>()
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -7,14 +7,14 @@ open class Outer<X, Y> {
|
||||
|
||||
class Derived : Outer<String, Int>() {
|
||||
fun foo(): Inner<Char> = null!!
|
||||
fun baz(): <!OTHER_ERROR, OTHER_ERROR!>Alias<Char><!> = null!!
|
||||
fun baz(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Alias<Char><!> = null!!
|
||||
}
|
||||
|
||||
|
||||
class A : Outer<Double, Short>() {
|
||||
class B : Outer<Float, Long>() {
|
||||
fun bar(): Inner<String> = null!!
|
||||
fun x(): <!OTHER_ERROR, OTHER_ERROR!>Alias<String><!> = null!!
|
||||
fun x(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Alias<String><!> = null!!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -10,12 +10,12 @@ private fun <E> foobar() = {
|
||||
fun a() = A<E, X, Y, Z>()
|
||||
}
|
||||
|
||||
typealias LocalAlias<W> = <!OTHER_ERROR!>A<E, X, Y, W><!>
|
||||
typealias LocalAlias<W> = <!UNRESOLVED_REFERENCE!>A<E, X, Y, W><!>
|
||||
}
|
||||
|
||||
class Derived : LocalOuter<Double, Short>() {
|
||||
fun foo(): LocalInner<Long> = null!!
|
||||
fun bar(): <!OTHER_ERROR, OTHER_ERROR!>LocalAlias<Char><!> = null!!
|
||||
fun bar(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>LocalAlias<Char><!> = null!!
|
||||
}
|
||||
|
||||
Derived()
|
||||
@@ -27,12 +27,12 @@ private fun noParameters() = {
|
||||
fun a() = A<Any, X, Y, Z>()
|
||||
}
|
||||
|
||||
typealias LocalAlias2<W> = <!OTHER_ERROR!>A<Any, X, Y, W><!>
|
||||
typealias LocalAlias2<W> = <!UNRESOLVED_REFERENCE!>A<Any, X, Y, W><!>
|
||||
}
|
||||
|
||||
class Derived2 : LocalOuter2<Double, Short>() {
|
||||
fun foo(): LocalInner2<Long> = null!!
|
||||
fun bar(): <!OTHER_ERROR, OTHER_ERROR!>LocalAlias2<Char><!> = null!!
|
||||
fun bar(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>LocalAlias2<Char><!> = null!!
|
||||
}
|
||||
|
||||
Derived2()
|
||||
|
||||
+4
-4
@@ -12,12 +12,12 @@ class Outer<T> {
|
||||
fun a() = A<T, F, E, X, Y, Z>()
|
||||
}
|
||||
|
||||
typealias LocalAlias<W> = <!OTHER_ERROR!>A<T, F, E, X, Y, W><!>
|
||||
typealias LocalAlias<W> = <!UNRESOLVED_REFERENCE!>A<T, F, E, X, Y, W><!>
|
||||
}
|
||||
|
||||
class Derived : LocalOuter<Double, Short>() {
|
||||
fun foo(): LocalInner<Long> = null!!
|
||||
fun bar(): <!OTHER_ERROR, OTHER_ERROR!>LocalAlias<Char><!> = null!!
|
||||
fun bar(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>LocalAlias<Char><!> = null!!
|
||||
}
|
||||
|
||||
Derived()
|
||||
@@ -29,12 +29,12 @@ class Outer<T> {
|
||||
fun a() = A<T, F, Any, X, Y, Z>()
|
||||
}
|
||||
|
||||
typealias LocalAlias2<W> = <!OTHER_ERROR!>A<T, F, Any, X, Y, W><!>
|
||||
typealias LocalAlias2<W> = <!UNRESOLVED_REFERENCE!>A<T, F, Any, X, Y, W><!>
|
||||
}
|
||||
|
||||
class Derived2 : LocalOuter2<Double, Short>() {
|
||||
fun foo(): LocalInner2<Long> = null!!
|
||||
fun bar(): <!OTHER_ERROR, OTHER_ERROR!>LocalAlias2<Char><!> = null!!
|
||||
fun bar(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>LocalAlias2<Char><!> = null!!
|
||||
}
|
||||
Derived2()
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ open class BaseDerived2<X> : BaseDerived1<String, X>()
|
||||
|
||||
class Derived : BaseDerived2<Int>() {
|
||||
fun foo(): Inner<Char> = null!!
|
||||
fun baz(): <!OTHER_ERROR, OTHER_ERROR!>Alias<Char><!> = null!!
|
||||
fun baz(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Alias<Char><!> = null!!
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
|
||||
+1
-1
@@ -17,4 +17,4 @@ class Outer<E> {
|
||||
|
||||
class E
|
||||
|
||||
fun bar(x: <!OTHER_ERROR!>Inner<!>) {}
|
||||
fun bar(x: Inner) {}
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@ class A<T> {
|
||||
val y: B<String>.C<String>? = null
|
||||
val z: B<String>.D? = null
|
||||
|
||||
val c: <!OTHER_ERROR!>C<Int>?<!> = null
|
||||
val d: <!OTHER_ERROR!>D?<!> = null
|
||||
val c: C<Int>? = null
|
||||
val d: D? = null
|
||||
|
||||
val innerMost: <!OTHER_ERROR!>Innermost<String>?<!> = null
|
||||
val innerMost: Innermost<String>? = null
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
class Outer<T> {
|
||||
inner class Inner
|
||||
fun foo(x: Outer<String>.Inner, y: <!OTHER_ERROR!>Outer.Inner<!>, z: Inner) {
|
||||
fun foo(x: Outer<String>.Inner, y: Outer.Inner, z: Inner) {
|
||||
var inner = Inner()
|
||||
x.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Inner>() }
|
||||
x.checkType { _<Outer<String>.Inner>() }
|
||||
|
||||
+2
-2
@@ -38,11 +38,11 @@ fun ok4(): Outer.Obj.Nested2<A>.Inner5<B> = null!!
|
||||
fun ok5(): test.Outer.Obj.Nested2<A>.Inner5<B> = null!!
|
||||
|
||||
// All arguments are resolved
|
||||
fun errorTypeWithArguments(): <!OTHER_ERROR!>Q<A>.W<B, C, D>.R.M<!> = null!!
|
||||
fun errorTypeWithArguments(): <!UNRESOLVED_REFERENCE!>Q<A>.W<B, C, D>.R.M<!> = null!!
|
||||
|
||||
fun error1(): Outer<A>.Inner<B>.Inner3<C, D> = 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 error3(): Outer.Inner<A, B>.Inner3<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!!
|
||||
|
||||
+9
-9
@@ -1,14 +1,14 @@
|
||||
interface I0<T : <!OTHER_ERROR!>Unresolved0<String><!>>
|
||||
interface I1<T> where T : <!OTHER_ERROR!>Unresolved1<String><!>
|
||||
interface I2<T : <!OTHER_ERROR!>Unresolved2<String><!>> where T : <!OTHER_ERROR!>Unresolved3<String><!>
|
||||
interface I0<T : <!UNRESOLVED_REFERENCE!>Unresolved0<String><!>>
|
||||
interface I1<T> where T : <!UNRESOLVED_REFERENCE!>Unresolved1<String><!>
|
||||
interface I2<T : <!UNRESOLVED_REFERENCE!>Unresolved2<String><!>> where T : <!UNRESOLVED_REFERENCE!>Unresolved3<String><!>
|
||||
|
||||
fun <E : <!OTHER_ERROR!>Unresolved4<String><!>> foo0() {}
|
||||
fun <E> foo1() where E : <!OTHER_ERROR!>Unresolved5<String><!> {}
|
||||
fun <E : <!OTHER_ERROR!>Unresolved6<String><!>> foo2() where E : <!OTHER_ERROR!>Unresolved7<String><!> {}
|
||||
fun <E : <!UNRESOLVED_REFERENCE!>Unresolved4<String><!>> foo0() {}
|
||||
fun <E> foo1() where E : <!UNRESOLVED_REFERENCE!>Unresolved5<String><!> {}
|
||||
fun <E : <!UNRESOLVED_REFERENCE!>Unresolved6<String><!>> foo2() where E : <!UNRESOLVED_REFERENCE!>Unresolved7<String><!> {}
|
||||
|
||||
val <E : <!OTHER_ERROR!>Unresolved7<!>> E.p1: Int
|
||||
val <E : <!UNRESOLVED_REFERENCE!>Unresolved7<!>> E.p1: Int
|
||||
get() = 1
|
||||
val <E> E.p2: Int where E : <!OTHER_ERROR!>Unresolved8<!>
|
||||
val <E> E.p2: Int where E : <!UNRESOLVED_REFERENCE!>Unresolved8<!>
|
||||
get() = 1
|
||||
val <E : <!OTHER_ERROR!>Unresolved9<!>> E.p3: Int where E : <!OTHER_ERROR!>Unresolved10<!>
|
||||
val <E : <!UNRESOLVED_REFERENCE!>Unresolved9<!>> E.p3: Int where E : <!UNRESOLVED_REFERENCE!>Unresolved10<!>
|
||||
get() = 1
|
||||
|
||||
Reference in New Issue
Block a user