FIR: report errors on FirResolvedTypeRef with ConeClassErrorType
Not sure what the difference from FirErrorTypeRef is.
This commit is contained in:
Vendored
+1
-1
@@ -151,7 +151,7 @@ fun main() {
|
||||
select(id(fun String.(x: String) {}), id(fun(x: String, y: String) { }), { x -> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String")!>this<!> })
|
||||
select(id(fun String.(x: String) {}), id(fun(x: String, y: String) { }), { x: String, y: String -> x })
|
||||
// Convert to extension lambda is impossible because the lambda parameter types aren't specified explicitly
|
||||
select(id(fun String.(x: String) {}), id(fun(x: String, y: String) { }), { x, y -> x })
|
||||
select(id(fun String.(x: String) {}), id(fun(x: String, y: String) { }), { x, <!CANNOT_INFER_PARAMETER_TYPE!>y<!> -> x })
|
||||
select(id(id(fun(x: String, y: String) { }), <!TOO_MANY_ARGUMENTS!>fun String.(x: String) {}<!>), { x, y -> x })
|
||||
val x26: Int.(String) -> Int = fun (x: String) = 10 // it must be error, see KT-38439
|
||||
// Receiver must be specified in anonymous function declaration
|
||||
|
||||
+3
-3
@@ -8,9 +8,9 @@ fun main() {
|
||||
val x3: () -> String = if (true) {{ -> "this" }} else {{ -> "this" }}
|
||||
val x4: String.() -> String = if (true) {{ str: String -> "this" }} else {{ str: String -> "this" }}
|
||||
val x41: String.(String) -> String = if (true) {{ str: String, str2: String -> "this" }} else {{ str: String, str2: String -> "this" }}
|
||||
val x42: String.(String) -> String = if (true) {{ str, str2 -> "this" }} else {{ str, str2 -> "this" }}
|
||||
val x5: String.() -> String = if (true) {{ str -> "this" }} else {{ str -> "this" }}
|
||||
val x6: String.() -> String = if (true) {{ str -> "this" }} else {{ "this" }}
|
||||
val x42: String.(String) -> String = if (true) {{ str, <!CANNOT_INFER_PARAMETER_TYPE!>str2<!> -> "this" }} else {{ str, <!CANNOT_INFER_PARAMETER_TYPE!>str2<!> -> "this" }}
|
||||
val x5: String.() -> String = if (true) {{ <!CANNOT_INFER_PARAMETER_TYPE!>str<!> -> "this" }} else {{ <!CANNOT_INFER_PARAMETER_TYPE!>str<!> -> "this" }}
|
||||
val x6: String.() -> String = if (true) {{ <!CANNOT_INFER_PARAMETER_TYPE!>str<!> -> "this" }} else {{ "this" }}
|
||||
val x7: String.() -> String = select({ -> this }, { -> this })
|
||||
val x8: String.() -> String = select({ this }, { this })
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,5 +13,5 @@ fun test1() {
|
||||
fun bar(f: (<!UNRESOLVED_REFERENCE!>A<!>)->Unit) {}
|
||||
|
||||
fun test2() {
|
||||
bar { a -> } // here we don't have 'cannot infer parameter type' error
|
||||
bar { <!UNRESOLVED_REFERENCE!>a<!> -> } // here we don't have 'cannot infer parameter type' error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user