JET-16 Check property initializers as parts of the primary constructor's body
This commit is contained in:
@@ -31,4 +31,21 @@ class WithPC1(a : Int) {
|
||||
|
||||
class Foo() : <error>WithPC0</error>, <error>this</error>() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class WithCPI_Dup(<error>x : Int</error>) {
|
||||
<error>var x : Int</error>
|
||||
}
|
||||
|
||||
class WithCPI(x : Int) {
|
||||
val a = 1
|
||||
val b : Int = $a
|
||||
val xy : Int = x
|
||||
}
|
||||
|
||||
class NoCPI {
|
||||
val a = <error>1</error>
|
||||
var ab = <error>1</error>
|
||||
get() = 1
|
||||
set(v) {}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ class Dup {
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
class A() {
|
||||
fun foo() : Unit {
|
||||
this@A
|
||||
this<error>@a</error>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Test {
|
||||
class Test() {
|
||||
<info>abstract</info> val x : Int
|
||||
<info>abstract</info> val x1 : Int <info>get</info>
|
||||
<info>abstract</info> val x2 : Int <info>get</info>() = 1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
class PrivateVal {
|
||||
class PrivateVal() {
|
||||
private val prop = 0;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class PrivateVar {
|
||||
class PrivateVar() {
|
||||
private var x = 0;
|
||||
|
||||
fun setValueOfX(aValue: Int) { x = aValue }
|
||||
|
||||
Reference in New Issue
Block a user