Drop "substitute with upper bounds" mode for calls with mapped arguments
(we don't need it since we build constraint system for generic types). Cleanup tests.
This commit is contained in:
@@ -16,11 +16,11 @@ fun discriminateGeneric(a: Int, b: String = "") = ""
|
||||
fun <T: CharSequence> withDefaultGeneric(t: T, d: T? = null) = 1
|
||||
fun <T: Any> withDefaultGeneric(t: T, d: T? = null, a: Int = 1) = ""
|
||||
|
||||
fun wrongTwoDefault(a: Any = 2) = 1
|
||||
fun wrongTwoDefault(a: Int = 2, b: String = "") = ""
|
||||
fun withDefaults(a: Any = 2) = 1
|
||||
fun withDefaults(a: Int = 2, b: String = "") = ""
|
||||
|
||||
fun <T: Any> wrongWithDefaultGeneric(t: T, d: T? = null) = 1
|
||||
fun <T: CharSequence> wrongWithDefaultGeneric(t: T, d: T? = null, a: Int = 1) = ""
|
||||
fun <T: Any> withGenericDefaults(t: T, d: T? = null) = 1
|
||||
fun <T: CharSequence> withGenericDefaults(t: T, d: T? = null, a: Int = 1) = ""
|
||||
|
||||
fun wrong(a: Int = 1) {}
|
||||
fun wrong(a: String = "", b: Int = 1) {}
|
||||
@@ -50,10 +50,9 @@ fun test() {
|
||||
val h = withDefaultGeneric("")
|
||||
h checkType { _<Int>() }
|
||||
|
||||
withDefaults(1)
|
||||
|
||||
wrongTwoDefault(1)
|
||||
|
||||
wrongWithDefaultGeneric("")
|
||||
withGenericDefaults("")
|
||||
|
||||
<!UNREACHABLE_CODE!><!OVERLOAD_RESOLUTION_AMBIGUITY!>wrong<!>(<!>null!!<!UNREACHABLE_CODE!>)<!>
|
||||
}
|
||||
Reference in New Issue
Block a user