Load of testdata change due to contracts publishing
See changes in e2606b72bdbec2fea567d4127197707869eb801e
This commit is contained in:
committed by
Ilya Gorbunov
parent
accbd07b2e
commit
ee8702d21e
+2
-1
@@ -1,7 +1,8 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun foo(b: Boolean): Boolean {
|
||||
contract {
|
||||
|
||||
Vendored
+2
-1
@@ -1,7 +1,8 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun bar(x: Int): Boolean = x == 0
|
||||
|
||||
|
||||
Vendored
+2
-1
@@ -1,7 +1,8 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun foo(boolean: Boolean) {
|
||||
contract {
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun foo(y: Boolean) {
|
||||
val <!UNUSED_VARIABLE!>x<!>: Int = 42
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
import kotlin.contracts.*
|
||||
|
||||
class Foo(val x: Int?) {
|
||||
fun isXNull(): Boolean {
|
||||
|
||||
+3
-2
@@ -1,11 +1,12 @@
|
||||
// !LANGUAGE: +AllowContractsForCustomFunctions +UseReturnsEffect
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||
|
||||
import kotlin.internal.contracts.*
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun Any?.foo(): Boolean {
|
||||
contract {
|
||||
returns(true) implies (<!ERROR_IN_CONTRACT_DESCRIPTION(only references to parameters are allowed. Did you miss label on <this>?)!>this<!> <!EQUALS_MISSING!>!=<!> null)
|
||||
returns(true) implies (<!SENSELESS_COMPARISON!><!ERROR_IN_CONTRACT_DESCRIPTION(only references to parameters are allowed. Did you miss label on <this>?)!>this<!> != null<!>)
|
||||
}
|
||||
return this != null
|
||||
}
|
||||
Reference in New Issue
Block a user