Files
kotlin-fork/compiler/testData/diagnostics/tests/ObjectWithConstructor.fir.kt
T
Dmitriy Novozhilov f283f2db43 [FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
Also introduce few new diagnostics:
- NONE_APPLICABLE more many inapplicable candidates
- HIDDEN for visible candidates
2020-07-28 20:46:56 +03:00

25 lines
707 B
Kotlin
Vendored

object A1<!CONSTRUCTOR_IN_OBJECT!>()<!> {
<!CONSTRUCTOR_IN_OBJECT!>constructor(x: Int = "", y: Int)<!> : <!NONE_APPLICABLE!>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) {
x + y
}
}
val x = object <!CONSTRUCTOR_IN_OBJECT!>(val prop: Int)<!> {
<!CONSTRUCTOR_IN_OBJECT!>constructor()<!> : this(1) {
val x = 1
x * x
}
}
class A3 {
companion object B<!CONSTRUCTOR_IN_OBJECT!>(val prop: Int)<!> {
public <!CONSTRUCTOR_IN_OBJECT!>constructor()<!> : <!NONE_APPLICABLE!>this<!>(2)
}
}