[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
@@ -1,14 +1,14 @@
interface I0<T : Unresolved0<String>>
interface I1<T> where T : Unresolved1<String>
interface I2<T : Unresolved2<String>> where T : Unresolved3<String>
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><!>
fun <E : Unresolved4<String>> foo0() {}
fun <E> foo1() where E : Unresolved5<String> {}
fun <E : Unresolved6<String>> foo2() where E : Unresolved7<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><!> {}
val <E : Unresolved7> E.p1: Int
val <E : <!OTHER_ERROR!>Unresolved7<!>> E.p1: Int
get() = 1
val <E> E.p2: Int where E : Unresolved8
val <E> E.p2: Int where E : <!OTHER_ERROR!>Unresolved8<!>
get() = 1
val <E : Unresolved9> E.p3: Int where E : Unresolved10
val <E : <!OTHER_ERROR!>Unresolved9<!>> E.p3: Int where E : <!OTHER_ERROR!>Unresolved10<!>
get() = 1