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!>)<!>
|
||||
}
|
||||
@@ -9,11 +9,11 @@ public fun twoDefault(/*0*/ a: kotlin.Any = ..., /*1*/ b: kotlin.String = ...):
|
||||
public fun twoDefault(/*0*/ a: kotlin.Int = ...): kotlin.Int
|
||||
public fun </*0*/ T : kotlin.CharSequence> withDefaultGeneric(/*0*/ t: T, /*1*/ d: T? = ...): kotlin.Int
|
||||
public fun </*0*/ T : kotlin.Any> withDefaultGeneric(/*0*/ t: T, /*1*/ d: T? = ..., /*2*/ a: kotlin.Int = ...): kotlin.String
|
||||
public fun withDefaults(/*0*/ a: kotlin.Any = ...): kotlin.Int
|
||||
public fun withDefaults(/*0*/ a: kotlin.Int = ..., /*1*/ b: kotlin.String = ...): kotlin.String
|
||||
public fun </*0*/ T> withGeneric(/*0*/ a: T): kotlin.Int
|
||||
public fun </*0*/ T> withGeneric(/*0*/ a: T, /*1*/ b: kotlin.Int = ...): kotlin.String
|
||||
public fun </*0*/ T : kotlin.Any> withGenericDefaults(/*0*/ t: T, /*1*/ d: T? = ...): kotlin.Int
|
||||
public fun </*0*/ T : kotlin.CharSequence> withGenericDefaults(/*0*/ t: T, /*1*/ d: T? = ..., /*2*/ a: kotlin.Int = ...): kotlin.String
|
||||
public fun wrong(/*0*/ a: kotlin.Int = ...): kotlin.Unit
|
||||
public fun wrong(/*0*/ a: kotlin.String = ..., /*1*/ b: kotlin.Int = ...): kotlin.Unit
|
||||
public fun wrongTwoDefault(/*0*/ a: kotlin.Any = ...): kotlin.Int
|
||||
public fun wrongTwoDefault(/*0*/ a: kotlin.Int = ..., /*1*/ b: kotlin.String = ...): kotlin.String
|
||||
public fun </*0*/ T : kotlin.Any> wrongWithDefaultGeneric(/*0*/ t: T, /*1*/ d: T? = ...): kotlin.Int
|
||||
public fun </*0*/ T : kotlin.CharSequence> wrongWithDefaultGeneric(/*0*/ t: T, /*1*/ d: T? = ..., /*2*/ a: kotlin.Int = ...): kotlin.String
|
||||
|
||||
Reference in New Issue
Block a user