Fixed tests after adding error checking for intention tests.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
class Owner {
|
||||
fun <caret>f(p: () -> Unit): (Int) -> String {}
|
||||
}
|
||||
fun <caret>f(p: () -> Unit): (Int) -> String {
|
||||
return { it.toString() }
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -2,4 +2,5 @@ class Owner {
|
||||
}
|
||||
|
||||
fun Owner.f(p: () -> Unit): (Int) -> String {
|
||||
}
|
||||
return { it.toString() }
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
abstract class Owner<T> {
|
||||
fun <caret>f<R>(t: T, r: R): R = t
|
||||
}
|
||||
fun <caret>f<R>(t: T, r: R): R = r
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
abstract class Owner<T> {
|
||||
}
|
||||
|
||||
fun <T, R> Owner<T>.f(t: T, r: R): R = t
|
||||
fun <T, R> Owner<T>.f(t: T, r: R): R = r
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
abstract class Owner<T, X: List<T>> {
|
||||
fun <R: T> <caret>f(t: T, r: R): R = t
|
||||
}
|
||||
fun <R: T> <caret>f(t: T, r: R): R = r
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
abstract class Owner<T, X: List<T>> {
|
||||
}
|
||||
|
||||
fun <T, X : List<T>, R : T> Owner<T, X>.f(t: T, r: R): R = t
|
||||
fun <T, X : List<T>, R : T> Owner<T, X>.f(t: T, r: R): R = r
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
|
||||
class Owner<T> {
|
||||
val <R> <caret>p: R
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
|
||||
class Owner<T> {
|
||||
}
|
||||
|
||||
val <T, R> Owner<T>.p: R
|
||||
get() = <caret><selection>throw UnsupportedOperationException()</selection>
|
||||
get() = <caret><selection>throw UnsupportedOperationException()</selection>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
abstract class Owner {
|
||||
protected fun <caret>f() = 1
|
||||
}
|
||||
protected fun <caret>f(): Int = 1
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
abstract class Owner {
|
||||
}
|
||||
|
||||
fun Owner.f() = 1
|
||||
fun Owner.f(): Int = 1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
abstract class Owner {
|
||||
public fun <caret>f() = 1
|
||||
}
|
||||
public fun <caret>f(): Int = 1
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
abstract class Owner {
|
||||
}
|
||||
|
||||
public fun Owner.f() = 1
|
||||
public fun Owner.f(): Int = 1
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
class Owner {
|
||||
fun <caret>f(p: kotlin.Int): kotlin.String {}
|
||||
}
|
||||
fun <caret>f(p: kotlin.Int): kotlin.String {
|
||||
return p.toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,4 +2,5 @@ class Owner {
|
||||
}
|
||||
|
||||
fun Owner.f(p: kotlin.Int): kotlin.String {
|
||||
}
|
||||
return p.toString()
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
// ERROR: A 'return' expression required in a function with a block body ('{...}')
|
||||
// ERROR: Unresolved reference: Foo
|
||||
// ERROR: Unresolved reference: bar
|
||||
|
||||
class Owner {
|
||||
fun <caret>f(p: Foo): bar.Baz {}
|
||||
}
|
||||
fun <caret>f(p: Foo): bar.Baz {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
// ERROR: A 'return' expression required in a function with a block body ('{...}')
|
||||
// ERROR: Unresolved reference: Foo
|
||||
// ERROR: Unresolved reference: bar
|
||||
|
||||
class Owner {
|
||||
}
|
||||
|
||||
fun Owner.f(p: Foo): bar.Baz {
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
class Owner {
|
||||
val <caret>p: Int
|
||||
get
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
class Owner {
|
||||
}
|
||||
|
||||
val Owner.p: Int
|
||||
get() = <caret><selection>throw UnsupportedOperationException()</selection>
|
||||
get() = <caret><selection>throw UnsupportedOperationException()</selection>
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
class Owner {
|
||||
var <caret>p: Int
|
||||
get
|
||||
set
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// ERROR: Property must be initialized or be abstract
|
||||
class Owner {
|
||||
}
|
||||
|
||||
@@ -5,4 +6,4 @@ var Owner.p: Int
|
||||
get() = <caret><selection>throw UnsupportedOperationException()</selection>
|
||||
set(value) {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
// ERROR: Property must be initialized
|
||||
class Owner {
|
||||
var <caret>p: Int
|
||||
get() = 1
|
||||
set
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// ERROR: Property must be initialized
|
||||
class Owner {
|
||||
}
|
||||
|
||||
@@ -5,4 +6,4 @@ var Owner.p: Int
|
||||
get() = 1
|
||||
set(value) {
|
||||
<caret><selection>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// ERROR: Property must be initialized
|
||||
class Owner {
|
||||
var <caret>p: Int
|
||||
get {return 1}
|
||||
}
|
||||
get() { return 1 }
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,10 +1,11 @@
|
||||
// ERROR: Property must be initialized
|
||||
class Owner {
|
||||
}
|
||||
|
||||
var Owner.p: Int
|
||||
get {
|
||||
get() {
|
||||
return 1
|
||||
}
|
||||
set(value) {
|
||||
<caret><selection>throw UnsupportedOperationException()</selection>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// ERROR: Property must be initialized
|
||||
class Owner {
|
||||
var <caret>p: Int
|
||||
set(v) {}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
// ERROR: Property must be initialized
|
||||
class Owner {
|
||||
}
|
||||
|
||||
var Owner.p: Int
|
||||
get() = <caret><selection>throw UnsupportedOperationException()</selection>
|
||||
set(v) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
class Owner {
|
||||
fun <caret>f(): Int {}
|
||||
}
|
||||
fun <caret>f(): Int { return 1 }
|
||||
}
|
||||
|
||||
@@ -2,4 +2,5 @@ class Owner {
|
||||
}
|
||||
|
||||
fun Owner.f(): Int {
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user