[FIR] Implement checker for value parameter default value type mismatch

#KT-58901 Fixed
This commit is contained in:
Kirill Rakhman
2023-06-22 13:33:09 +02:00
committed by Space Team
parent cfc824f9f2
commit 028921ade1
19 changed files with 152 additions and 37 deletions
@@ -1,11 +1,11 @@
object A1<!CONSTRUCTOR_IN_OBJECT!>()<!> {
<!CONSTRUCTOR_IN_OBJECT!>constructor(x: Int = "", y: Int)<!> : <!UNRESOLVED_REFERENCE!>this<!>() {
<!CONSTRUCTOR_IN_OBJECT!>constructor(x: Int = <!INITIALIZER_TYPE_MISMATCH!>""<!>, y: Int)<!> : <!UNRESOLVED_REFERENCE!>this<!>() {
x + y
}
}
object A2 public <!CONSTRUCTOR_IN_OBJECT!>constructor(private val prop: Int)<!> {
<!CONSTRUCTOR_IN_OBJECT!>constructor(x: Int = "", y: Int)<!> : <!NONE_APPLICABLE!>this<!>(x * y) {
<!CONSTRUCTOR_IN_OBJECT!>constructor(x: Int = <!INITIALIZER_TYPE_MISMATCH!>""<!>, y: Int)<!> : <!NONE_APPLICABLE!>this<!>(x * y) {
x + y
}
}