[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:
Vendored
+7
-7
@@ -12,10 +12,10 @@ inline class ULong(private val l: Long)
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
annotation class AnnoUB(val ub0: UByte, val ub1: UByte)
|
||||
annotation class AnnoUS(val us0: UShort, val us1: UShort)
|
||||
annotation class AnnoUI(val ui0: UInt, val ui1: UInt, val ui2: UInt, val ui3: UInt)
|
||||
annotation class AnnoUL(val ul0: ULong, val ul1: ULong)
|
||||
annotation class AnnoUB(val ub0: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>UByte<!>, val ub1: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>UByte<!>)
|
||||
annotation class AnnoUS(val us0: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>UShort<!>, val us1: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>UShort<!>)
|
||||
annotation class AnnoUI(val ui0: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>UInt<!>, val ui1: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>UInt<!>, val ui2: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>UInt<!>, val ui3: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>UInt<!>)
|
||||
annotation class AnnoUL(val ul0: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>ULong<!>, val ul1: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>ULong<!>)
|
||||
|
||||
const val ub0 = <!UNRESOLVED_REFERENCE!>UByte<!>(1)
|
||||
const val us0 = <!UNRESOLVED_REFERENCE!>UShort<!>(2)
|
||||
@@ -37,8 +37,8 @@ fun f2() {}
|
||||
@AnnoUL(ul0, <!UNRESOLVED_REFERENCE!>ULong<!>(5))
|
||||
fun f3() {}
|
||||
|
||||
const val explicit: UInt = <!UNRESOLVED_REFERENCE!>UInt<!>(2)
|
||||
const val explicit: <!OTHER_ERROR, OTHER_ERROR!>UInt<!> = <!UNRESOLVED_REFERENCE!>UInt<!>(2)
|
||||
|
||||
const val nullable: UInt? = <!UNRESOLVED_REFERENCE!>UInt<!>(3)
|
||||
const val nullable: <!OTHER_ERROR, OTHER_ERROR!>UInt?<!> = <!UNRESOLVED_REFERENCE!>UInt<!>(3)
|
||||
|
||||
annotation class NullableAnno(val u: UInt?)
|
||||
annotation class NullableAnno(val u: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>UInt?<!>)
|
||||
Reference in New Issue
Block a user