[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
@@ -47,18 +47,18 @@ fun test() {
val ic: I.NC = I.NC()
val ii: I.NI? = null
val bc: B.NC = B.<!UNRESOLVED_REFERENCE!>NC<!>()
val bic: B.IC = B().IC()
val bi: B.NI? = null
val bc: <!OTHER_ERROR!>B.NC<!> = B.<!UNRESOLVED_REFERENCE!>NC<!>()
val bic: <!OTHER_ERROR!>B.IC<!> = B().IC()
val bi: <!OTHER_ERROR!>B.NI?<!> = null
val cc: C.NC = C.<!UNRESOLVED_REFERENCE!>NC<!>()
val ci: C.NI? = null
val cc: <!OTHER_ERROR!>C.NC<!> = C.<!UNRESOLVED_REFERENCE!>NC<!>()
val ci: <!OTHER_ERROR!>C.NI?<!> = null
val dc: D.NC = D.<!UNRESOLVED_REFERENCE!>NC<!>()
val dic: D.IC = D().IC()
val di: D.NI? = null
val dc: <!OTHER_ERROR!>D.NC<!> = D.<!UNRESOLVED_REFERENCE!>NC<!>()
val dic: <!OTHER_ERROR!>D.IC<!> = D().IC()
val di: <!OTHER_ERROR!>D.NI?<!> = null
val kc: K.NC = K.<!UNRESOLVED_REFERENCE!>NC<!>()
val kic: K.IC = K().IC()
val ki: K.NI? = null
val kc: <!OTHER_ERROR!>K.NC<!> = K.<!UNRESOLVED_REFERENCE!>NC<!>()
val kic: <!OTHER_ERROR!>K.IC<!> = K().IC()
val ki: <!OTHER_ERROR!>K.NI?<!> = null
}