JET-6 Perform checks for primary and secondary constructors (In progress): class having a stateful property must have a constructor
This commit is contained in:
@@ -43,7 +43,7 @@ class WithCPI(x : Int) {
|
||||
val xy : Int = x
|
||||
}
|
||||
|
||||
class NoCPI {
|
||||
class <error>NoCPI</error> {
|
||||
val a = <error>1</error>
|
||||
var ab = <error>1</error>
|
||||
get() = 1
|
||||
|
||||
@@ -35,7 +35,7 @@ class NotRange5() {
|
||||
|
||||
class AmbiguousHasNextIterator {
|
||||
fun hasNext() : Boolean
|
||||
val hasNext : Boolean
|
||||
val hasNext : Boolean get() = false
|
||||
fun next() : Int
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class NotRange6() {
|
||||
}
|
||||
|
||||
class ImproperIterator4 {
|
||||
val hasNext : Int
|
||||
val hasNext : Int get() = 1
|
||||
fun next() : Int
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class Iteratee<in I, out O> {
|
||||
abstract fun done() : O
|
||||
}
|
||||
|
||||
class Sum : Iteratee<Int, Int> {
|
||||
class Sum() : Iteratee<Int, Int> {
|
||||
override fun process(item : Int) : Iteratee<Int, Int> {
|
||||
return foobar.done<Int>(item);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
class <error>X</error> {
|
||||
val x : Int
|
||||
}
|
||||
|
||||
class Y() {
|
||||
val x : Int
|
||||
}
|
||||
|
||||
class Y1 {
|
||||
val x : Int get() = 1
|
||||
}
|
||||
|
||||
class Z : Y<error>()</error> {
|
||||
}
|
||||
Reference in New Issue
Block a user