FIR: Fix overload resolution with defaults

This commit is contained in:
Denis Zharkov
2020-09-29 19:16:42 +03:00
parent 4964ff0019
commit 85b8673434
5 changed files with 15 additions and 9 deletions
@@ -1,9 +1,9 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A(x: String = "", y: String = "") {
constructor(x: String, y: String): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(x, y)
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("", "")
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("", "")
constructor(x: String, y: String): <!AMBIGUITY!>this<!>(x, y)
constructor(): <!AMBIGUITY!>this<!>("", "")
constructor(): <!AMBIGUITY!>this<!>("", "")
}
class B {
@@ -14,9 +14,9 @@ fun B(x: Int) {}
class Outer {
class A(x: String = "", y: String = "") {
constructor(x: String, y: String): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(x, y)
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("", "")
constructor(): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("", "")
constructor(x: String, y: String): <!AMBIGUITY!>this<!>(x, y)
constructor(): <!AMBIGUITY!>this<!>("", "")
constructor(): <!AMBIGUITY!>this<!>("", "")
}
class B {
@@ -24,4 +24,4 @@ class Outer {
}
fun B(x: Int) {}
}
}