Files
kotlin-fork/idea/testData/checker/Constructors.jet
T
2012-05-22 18:23:51 +04:00

51 lines
937 B
Plaintext

open class NoC
class NoC1 : NoC()
class WithC0() : NoC()
open class WithC1() : NoC()
class NoC2 : <error>WithC1</error>
class NoC3 : WithC1()
class WithC2() : <error>WithC1</error>
class <error>NoPC</error> {
<error><error>this</error>() {}</error>
}
class WithPC0() {
<warning>this(a : Int) : this() {}</warning>
}
class WithPC1(a : Int) {
<warning><error>this</error>() {}</warning>
<warning>this(b : Long) : this("") {}</warning>
<warning>this(s : String) : this(1) {}</warning>
<warning>this(b : Char) : <error>this</error>("", 2) {}</warning>
<warning>this(b : Byte) : this(""), <error>this(1)</error> {}</warning>
}
class Foo() : <error>WithPC0</error>(), <error>this</error>() {
}
class WithCPI_Dup(x : Int) {
<error>var x : Int</error>
}
class WithCPI(x : Int) {
val a = 1
val b : Int = $a
val xy : Int = x
}
class NoCPI {
val a = 1
var ab = <error>1</error>
get() = 1
set(v) {}
}