[FIR] Introduce TYPE_ARGUMENTS_NOT_ALLOWED & some other type errors

This commit introduces several different things, in particular:
- check type arguments in expressions
- new TypeArgumentList node to deal with diagnostic source
- ConeDiagnostic was moved to fir:cones
- ConeIntermediateDiagnostic to use in inference (?) without reporting
- detailed diagnostics on error type
This commit is contained in:
Mikhail Glukhikh
2020-07-22 10:29:59 +03:00
parent c744dfba9c
commit 0804c6a0f3
196 changed files with 774 additions and 484 deletions
@@ -6,14 +6,14 @@ package foobar.a
import java.*
val a : java.util.List<Int>? = null
val a2 : util.List<Int>? = null
val a3 : LinkedList<Int>? = null
val a2 : <!OTHER_ERROR, OTHER_ERROR!>util.List<Int>?<!> = null
val a3 : <!OTHER_ERROR, OTHER_ERROR!>LinkedList<Int>?<!> = null
// FILE: b.kt
package foobar
abstract class Foo<T>() {
abstract val x : T<Int>
abstract val x : <!TYPE_ARGUMENTS_NOT_ALLOWED, TYPE_ARGUMENTS_NOT_ALLOWED!>T<Int><!>
}
// FILE: b.kt
@@ -21,7 +21,7 @@ package foobar.a
import java.util.*
val b : List<Int>? = a
val b1 : util.List<Int>? = a
val b1 : <!OTHER_ERROR, OTHER_ERROR!>util.List<Int>?<!> = a
// FILE: b.kt
package foobar