More accurate error reporting
with type inference error for delegated properties Add the constraints from completer if they don't lead to errors except errors from upper bounds to improve diagnostics
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class A(val map: MutableMap<String, CharSequence>) {
|
||||
|
||||
var a: String by map.withDefault1 { "foo" }
|
||||
}
|
||||
|
||||
fun <G> MutableMap<in String, in G>.get(thisRef: Any?, property: PropertyMetadata): G = throw Exception()
|
||||
|
||||
fun <S> MutableMap<in String, in S>.set(thisRef: Any?, property: PropertyMetadata, value: S) {}
|
||||
|
||||
fun <K, V> MutableMap<K, V>.withDefault1(default: (key: K) -> V): MutableMap<K, V> = this
|
||||
Reference in New Issue
Block a user