[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:
+1
-1
@@ -2,5 +2,5 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
@ArrayList<Int>(1, 1) fun b() {}
|
||||
@Xoo(<!UNRESOLVED_REFERENCE!>x<!>) fun c() {}
|
||||
@<!OTHER_ERROR!>Xoo<!>(<!UNRESOLVED_REFERENCE!>x<!>) fun c() {}
|
||||
@java.lang.Deprecated(<!UNRESOLVED_REFERENCE!>x<!>) fun a() {}
|
||||
@@ -1,3 +1,3 @@
|
||||
// Check that there won't be "Rewrite at slice ANNOTATION key" exception - EA-36935
|
||||
@someErrorAnnotation object Test {
|
||||
@<!OTHER_ERROR!>someErrorAnnotation<!> object Test {
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ package test
|
||||
// Checks that there is no rewrite error at ANNOTATION slice because of resolving annotations for object in lazy resolve and resolving
|
||||
// object as property (method tries to resolve annotations too).
|
||||
|
||||
@BadAnnotation
|
||||
@<!OTHER_ERROR!>BadAnnotation<!>
|
||||
object SomeObject
|
||||
|
||||
val some = SomeObject
|
||||
+1
-1
@@ -34,7 +34,7 @@ annotation class Ann8(val p1: Array<String>,
|
||||
val p4: Array<Ann1>)
|
||||
|
||||
annotation class Ann9(
|
||||
val error: Unresolved = <!UNRESOLVED_REFERENCE!>Unresolved<!>.<!UNRESOLVED_REFERENCE!>VALUE<!>
|
||||
val error: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Unresolved<!> = <!UNRESOLVED_REFERENCE!>Unresolved<!>.<!UNRESOLVED_REFERENCE!>VALUE<!>
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
fun foo(@varargs f : Int) {}
|
||||
fun foo(@<!OTHER_ERROR!>varargs<!> f : Int) {}
|
||||
|
||||
var bar : Int = 1
|
||||
set(@varargs v) {}
|
||||
set(@<!OTHER_ERROR!>varargs<!> v) {}
|
||||
|
||||
val x : (Int) -> Int = {@varargs x <!SYNTAX!>: Int -> x<!>}
|
||||
val x : (Int) -> Int = {@<!OTHER_ERROR!>varargs<!> x <!SYNTAX!>: Int -> x<!>}
|
||||
|
||||
class Hello(@varargs args: Any) {
|
||||
class Hello(@<!OTHER_ERROR!>varargs<!> args: Any) {
|
||||
}
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
@Ann class A
|
||||
@Ann class B
|
||||
@Ann(1) class C
|
||||
@kotlin.Ann(1) class D
|
||||
@kotlin.annotation.Ann(1) class E
|
||||
@<!OTHER_ERROR!>Ann<!> class A
|
||||
@<!OTHER_ERROR!>Ann<!> class B
|
||||
@<!OTHER_ERROR!>Ann<!>(1) class C
|
||||
@<!OTHER_ERROR!>kotlin.Ann<!>(1) class D
|
||||
@<!OTHER_ERROR!>kotlin.annotation.Ann<!>(1) class E
|
||||
Reference in New Issue
Block a user