Update spec testdata according to previous commits
This commit is contained in:
+8
-7
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: +AllowContractsForNonOverridableMembers +AllowReifiedGenericsInContracts
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -UNREACHABLE_CODE -UNUSED_EXPRESSION
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
|
||||
@@ -19,16 +20,16 @@ object case_1 {
|
||||
private const val value_3 = false
|
||||
|
||||
fun case_1_1(): Boolean? {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returnsNotNull() implies (value_1) }
|
||||
contract { returnsNotNull() implies (<!ERROR_IN_CONTRACT_DESCRIPTION!>value_1<!>) }
|
||||
return if (value_1) true else null
|
||||
}
|
||||
fun case_1_2(): Boolean? {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns(null) implies (value_2) }
|
||||
contract { returns(null) implies (<!ERROR_IN_CONTRACT_DESCRIPTION!>value_2<!>) }
|
||||
return if (value_2) null else true
|
||||
}
|
||||
|
||||
fun case_1_3(): Boolean {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns(true) implies (value_3) }
|
||||
contract { returns(true) implies (<!ERROR_IN_CONTRACT_DESCRIPTION!>value_3<!>) }
|
||||
return value_3
|
||||
}
|
||||
}
|
||||
@@ -50,22 +51,22 @@ class case_2(value_5: Boolean, val value_1: Boolean) {
|
||||
}
|
||||
|
||||
fun case_2_2(): Boolean? {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns(null) implies (value_1) }
|
||||
contract { returns(null) implies (<!ERROR_IN_CONTRACT_DESCRIPTION!>value_1<!>) }
|
||||
return if (value_1) null else true
|
||||
}
|
||||
|
||||
fun case_2_3(): Boolean {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns(true) implies (value_2) }
|
||||
contract { returns(true) implies (<!ERROR_IN_CONTRACT_DESCRIPTION!>value_2<!>) }
|
||||
return value_2
|
||||
}
|
||||
|
||||
fun case_2_4(): Boolean {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns(false) implies (value_3) }
|
||||
contract { returns(false) implies (<!ERROR_IN_CONTRACT_DESCRIPTION!>value_3<!>) }
|
||||
return !(value_3)
|
||||
}
|
||||
|
||||
inline fun <reified K : Number> K.case_2_5(): Boolean? {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returnsNotNull() implies (<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>value_4<!>) }
|
||||
contract { returnsNotNull() implies (<!ERROR_IN_CONTRACT_DESCRIPTION, NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>value_4<!>) }
|
||||
return if (<!NON_PUBLIC_CALL_FROM_PUBLIC_INLINE!>value_4<!>) true else null
|
||||
}
|
||||
}
|
||||
|
||||
+1
-12
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: +AllowContractsForNonOverridableMembers +AllowReifiedGenericsInContracts
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
|
||||
/*
|
||||
@@ -22,15 +23,3 @@ fun <T : Number, K : <!FINAL_UPPER_BOUND!>String<!>> T?.case_2(value_1: K?) {
|
||||
contract { returns() implies (this@case_2 is <!ERROR_IN_CONTRACT_DESCRIPTION!>T<!> && value_1 is K) }
|
||||
if (!(this@case_2 is T && value_1 is K)) throw Exception()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
inline fun <reified T : Number> T?.case_3(value_1: Any?) {
|
||||
contract { returns() implies (value_1 is <!ERROR_IN_CONTRACT_DESCRIPTION!>T<!>) }
|
||||
if (!(value_1 is T)) throw Exception()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 4
|
||||
inline fun <reified T : Number, K> K?.case_4(value_1: Any?) {
|
||||
contract { returns() implies (this@case_4 !is <!ERROR_IN_CONTRACT_DESCRIPTION!>T<!> || value_1 is T) }
|
||||
if (!(this@case_4 !is T || value_1 is T)) throw Exception()
|
||||
}
|
||||
|
||||
-2
@@ -2,5 +2,3 @@ package
|
||||
|
||||
public fun </*0*/ T : kotlin.Number?> T.case_1(): kotlin.Unit
|
||||
public fun </*0*/ T : kotlin.Number, /*1*/ K : kotlin.String> T?.case_2(/*0*/ value_1: K?): kotlin.Unit
|
||||
public inline fun </*0*/ reified T : kotlin.Number> T?.case_3(/*0*/ value_1: kotlin.Any?): kotlin.Unit
|
||||
public inline fun </*0*/ reified T : kotlin.Number, /*1*/ K> K?.case_4(/*0*/ value_1: kotlin.Any?): kotlin.Unit
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// !LANGUAGE: +AllowContractsForNonOverridableMembers +AllowReifiedGenericsInContracts
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: contracts, declarations, contractBuilder, effects, returns
|
||||
* NUMBER: 4
|
||||
* DESCRIPTION: Returns effect with type checking with generic parameter
|
||||
*/
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
inline fun <reified T : Number> T?.case_1(value_1: Any?) {
|
||||
contract { returns() implies (value_1 is T) }
|
||||
if (!(value_1 is T)) throw Exception()
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
inline fun <reified T : Number, K> K?.case_2(value_1: Any?) {
|
||||
contract { returns() implies (this@case_2 !is T || value_1 is T) }
|
||||
if (!(this@case_2 !is T || value_1 is T)) throw Exception()
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package
|
||||
|
||||
public inline fun </*0*/ reified T : kotlin.Number> T?.case_1(/*0*/ value_1: kotlin.Any?): kotlin.Unit
|
||||
Returns(WILDCARD) -> value_1 is T
|
||||
|
||||
public inline fun </*0*/ reified T : kotlin.Number, /*1*/ K> K?.case_2(/*0*/ value_1: kotlin.Any?): kotlin.Unit
|
||||
Returns(WILDCARD) -> <this> !is T || value_1 is T
|
||||
|
||||
Vendored
+12
-29
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: +AllowContractsForNonOverridableMembers +AllowReifiedGenericsInContracts
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
|
||||
/*
|
||||
@@ -34,14 +35,6 @@ fun case_2() {
|
||||
println("1")
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
object case_3 {
|
||||
fun case_3(block: () -> Unit) {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
|
||||
return block()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TESTCASE NUMBER: 4
|
||||
* ISSUES: KT-26244
|
||||
@@ -49,35 +42,25 @@ object case_3 {
|
||||
class case_4 : ClassLevel3() {
|
||||
|
||||
fun <T : Number?>T.case_4_1(): Boolean {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns(false) implies (<!USELESS_IS_CHECK!>this@case_4 !is ClassLevel1<!>) }
|
||||
contract { returns(false) implies (<!USELESS_IS_CHECK!><!ERROR_IN_CONTRACT_DESCRIPTION!>this@case_4<!> !is ClassLevel1<!>) }
|
||||
return this == null
|
||||
}
|
||||
|
||||
fun case_4_2(number: Int?): Boolean {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns(false) implies (number != null) }
|
||||
return number == null
|
||||
}
|
||||
|
||||
fun <T>T?.case_4_3(): Boolean {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns(false) implies (this@case_4_3 !is Number) }
|
||||
return this@case_4_3 is Number
|
||||
}
|
||||
|
||||
fun <T : <!FINAL_UPPER_BOUND!>Boolean<!>>T.case_4_4() {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns() implies (!this@case_4_4) }
|
||||
fun <T : <!FINAL_UPPER_BOUND!>Boolean<!>>T.case_4_2() {
|
||||
<!ERROR_IN_CONTRACT_DESCRIPTION!>contract<!> { returns() implies (!this@case_4_2) }
|
||||
if (this) throw Exception()
|
||||
}
|
||||
|
||||
fun <T>T.case_4_5_wrap() {
|
||||
fun case_4_5_contract() {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns() implies (this@case_4_5_wrap is ClassLevel1) }
|
||||
if (this@case_4_5_wrap !is ClassLevel1) throw Exception()
|
||||
fun <T>T.case_4_3_wrap() {
|
||||
fun case_4_3_contract() {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns() implies (this@case_4_3_wrap is ClassLevel1) }
|
||||
if (this@case_4_3_wrap !is ClassLevel1) throw Exception()
|
||||
}
|
||||
case_4_5_contract()
|
||||
case_4_3_contract()
|
||||
println("!")
|
||||
}
|
||||
|
||||
fun case_4_5() = ClassLevel3().case_4_5_wrap()
|
||||
fun case_4_3() = ClassLevel3().case_4_3_wrap()
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -87,12 +70,12 @@ class case_4 : ClassLevel3() {
|
||||
class case_5<T> : ClassLevel5() {
|
||||
inner class case_5_1 {
|
||||
fun <K : Number?>K.case_5_1_1() {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns() implies (this@case_5_1 !is ClassLevel1 && <!SENSELESS_COMPARISON!>this@case_5_1 != null<!> || <!USELESS_IS_CHECK!>this@case_5 is ClassLevel1<!> && this@case_5_1_1 is Float) }
|
||||
contract { returns() implies (<!ERROR_IN_CONTRACT_DESCRIPTION!>this@case_5_1<!> !is ClassLevel1 && <!SENSELESS_COMPARISON!>this@case_5_1 != null<!> || <!USELESS_IS_CHECK!>this@case_5 is ClassLevel1<!> && this@case_5_1_1 is Float) }
|
||||
if (!(this@case_5_1 !is ClassLevel1 && <!SENSELESS_COMPARISON!>this@case_5_1 != null<!> || <!USELESS_IS_CHECK!>this@case_5 is ClassLevel1<!> && this is Float)) throw Exception()
|
||||
}
|
||||
|
||||
fun case_5_1_2() {
|
||||
<!CONTRACT_NOT_ALLOWED!>contract<!> { returns() implies (this@case_5_1 !is ClassLevel1 || <!USELESS_IS_CHECK!>this@case_5 is ClassLevel1<!> || <!SENSELESS_COMPARISON!>this@case_5_1 == null<!>) }
|
||||
contract { returns() implies (this@case_5_1 !is ClassLevel1 || <!USELESS_IS_CHECK!><!ERROR_IN_CONTRACT_DESCRIPTION!>this@case_5<!> is ClassLevel1<!> || <!SENSELESS_COMPARISON!>this@case_5_1 == null<!>) }
|
||||
if (!(this@case_5_1 !is ClassLevel1 || <!USELESS_IS_CHECK!>this@case_5 is ClassLevel1<!> || <!SENSELESS_COMPARISON!>this@case_5_1 == null<!>)) throw Exception()
|
||||
}
|
||||
}
|
||||
|
||||
compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/neg/2.txt
Vendored
+3
-13
@@ -257,18 +257,9 @@ public final class Out</*0*/ out T> {
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object case_3 {
|
||||
private constructor case_3()
|
||||
public final fun case_3(/*0*/ block: () -> kotlin.Unit): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class case_4 : ClassLevel3 {
|
||||
public constructor case_4()
|
||||
public final fun case_4_2(/*0*/ number: kotlin.Int?): kotlin.Boolean
|
||||
public final fun case_4_5(): kotlin.Unit
|
||||
public final fun case_4_3(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
@@ -276,9 +267,8 @@ public final class case_4 : ClassLevel3 {
|
||||
public final override /*1*/ /*fake_override*/ fun test3(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final fun </*0*/ T : kotlin.Number?> T.case_4_1(): kotlin.Boolean
|
||||
public final fun </*0*/ T> T?.case_4_3(): kotlin.Boolean
|
||||
public final fun </*0*/ T : kotlin.Boolean> T.case_4_4(): kotlin.Unit
|
||||
public final fun </*0*/ T> T.case_4_5_wrap(): kotlin.Unit
|
||||
public final fun </*0*/ T : kotlin.Boolean> T.case_4_2(): kotlin.Unit
|
||||
public final fun </*0*/ T> T.case_4_3_wrap(): kotlin.Unit
|
||||
}
|
||||
|
||||
public final class case_5</*0*/ T> : ClassLevel5 {
|
||||
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
// !LANGUAGE: +AllowContractsForNonOverridableMembers +AllowReifiedGenericsInContracts
|
||||
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS NOT LINKED SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SECTIONS: contracts, declarations, contractFunction
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: Check report about use contracts in literal functions, lambdas or not top-level functions.
|
||||
* HELPERS: classes
|
||||
*/
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
object case_1 {
|
||||
fun case_1(block: () -> Unit) {
|
||||
contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) }
|
||||
return block()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
class case_2 : ClassLevel3() {
|
||||
|
||||
fun case_2_1(number: Int?): Boolean {
|
||||
contract { returns(false) implies (number != null) }
|
||||
return number == null
|
||||
}
|
||||
|
||||
fun <T>T?.case_2_2(): Boolean {
|
||||
contract { returns(false) implies (this@case_2_2 !is Number) }
|
||||
return this@case_2_2 is Number
|
||||
}
|
||||
}
|
||||
compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/pos/2.txt
Vendored
+282
@@ -0,0 +1,282 @@
|
||||
package
|
||||
|
||||
public operator fun Class?.dec(): Class?
|
||||
public operator fun Class?.inc(): Class?
|
||||
public operator fun Class?.minus(/*0*/ x: Class?): Class?
|
||||
public operator fun Class?.plus(/*0*/ x: Class?): Class?
|
||||
|
||||
public final class Class {
|
||||
public constructor Class()
|
||||
public final val prop_1: kotlin.Int = 1
|
||||
public final val prop_10: kotlin.Number? = 3.0.toFloat()
|
||||
public final val prop_11: kotlin.Int = 10
|
||||
public final var prop_12: kotlin.String
|
||||
public final val prop_13: kotlin.Any? = ""
|
||||
public final val prop_14: kotlin.Comparable<*>? = null
|
||||
public final val prop_15: kotlin.collections.Iterable<*>? = null
|
||||
public final val prop_2: kotlin.Int = 2
|
||||
public final val prop_3: kotlin.Int = 3
|
||||
public final val prop_4: kotlin.Float? = 3.0.toFloat()
|
||||
public final val prop_5: kotlin.Float = 3.0.toFloat()
|
||||
public final val prop_6: kotlin.String = "..."
|
||||
public final val prop_7: kotlin.Nothing? = null
|
||||
public final val prop_8: Class? = null
|
||||
public final var prop_9: kotlin.Boolean
|
||||
public final operator fun contains(/*0*/ a: kotlin.Char): kotlin.Boolean
|
||||
public final operator fun contains(/*0*/ a: kotlin.Int): kotlin.Boolean
|
||||
public final operator fun contains(/*0*/ a: kotlin.Long): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun fun_1(): (kotlin.Int) -> (kotlin.Int) -> kotlin.Int
|
||||
public final fun fun_2(/*0*/ value_1: kotlin.Int): kotlin.Int
|
||||
public final fun fun_3(/*0*/ value_1: kotlin.Int): (kotlin.Int) -> kotlin.Int
|
||||
public final fun fun_4(): Class?
|
||||
public final operator fun get(/*0*/ i1: kotlin.Int): kotlin.Int
|
||||
public final operator fun get(/*0*/ i1: kotlin.Int, /*1*/ i2: kotlin.Int): kotlin.Int
|
||||
public final fun getCharArray(): kotlin.CharArray
|
||||
public final fun getIntArray(): kotlin.IntArray
|
||||
public final fun getLongArray(): kotlin.LongArray
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final operator fun invoke(): kotlin.Unit
|
||||
public final operator fun invoke(/*0*/ x: kotlin.Any): (kotlin.Any) -> kotlin.Any
|
||||
public final operator fun invoke(/*0*/ x: kotlin.Any, /*1*/ y: kotlin.Any): kotlin.Unit
|
||||
public final operator fun set(/*0*/ i1: kotlin.Int, /*1*/ el: kotlin.Int): kotlin.Unit
|
||||
public final operator fun set(/*0*/ i1: kotlin.Int, /*1*/ i2: kotlin.Int, /*2*/ el: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class NestedClass {
|
||||
public constructor NestedClass()
|
||||
public final val prop_4: kotlin.Int = 4
|
||||
public final val prop_5: kotlin.Int = 5
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public open class ClassLevel1 {
|
||||
public constructor ClassLevel1()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun test1(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassLevel2 : ClassLevel1 {
|
||||
public constructor ClassLevel2()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
public final fun test2(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassLevel21 : ClassLevel1 {
|
||||
public constructor ClassLevel21()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
public final fun test21(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassLevel22 : ClassLevel1 {
|
||||
public constructor ClassLevel22()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
public final fun test22(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassLevel23 : ClassLevel1 {
|
||||
public constructor ClassLevel23()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
public final fun test23(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassLevel3 : ClassLevel2 {
|
||||
public constructor ClassLevel3()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test2(): kotlin.Unit
|
||||
public final fun test3(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassLevel4 : ClassLevel3 {
|
||||
public constructor ClassLevel4()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test2(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test3(): kotlin.Unit
|
||||
public final fun test4(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassLevel5 : ClassLevel4 {
|
||||
public constructor ClassLevel5()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test2(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test3(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test4(): kotlin.Unit
|
||||
public final fun test5(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class ClassLevel6 : ClassLevel5 {
|
||||
public constructor ClassLevel6()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test2(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test3(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test4(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test5(): kotlin.Unit
|
||||
public final fun test6(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class ClassWithCompanionObject {
|
||||
public constructor ClassWithCompanionObject()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public open class ClassWithCostructorParam {
|
||||
public constructor ClassWithCostructorParam(/*0*/ x: kotlin.Any)
|
||||
public final val x: kotlin.Any
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassWithCostructorTwoParams {
|
||||
public constructor ClassWithCostructorTwoParams(/*0*/ x: kotlin.Any, /*1*/ y: kotlin.Any)
|
||||
public final val x: kotlin.Any
|
||||
public final val y: kotlin.Any
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassWithCustomEquals {
|
||||
public constructor ClassWithCustomEquals()
|
||||
public open override /*1*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassWithSixTypeParameters</*0*/ K, /*1*/ in L, /*2*/ out M, /*3*/ O, /*4*/ in P, /*5*/ out R> {
|
||||
public constructor ClassWithSixTypeParameters</*0*/ K, /*1*/ in L, /*2*/ out M, /*3*/ O, /*4*/ in P, /*5*/ out R>(/*0*/ u: R, /*1*/ x: K, /*2*/ y: M, /*3*/ z: O)
|
||||
public final val u: R
|
||||
public final val x: K
|
||||
public final val y: M
|
||||
public final val z: O
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun test(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassWithThreeTypeParameters</*0*/ K, /*1*/ L, /*2*/ M> {
|
||||
public constructor ClassWithThreeTypeParameters</*0*/ K, /*1*/ L, /*2*/ M>(/*0*/ x: K, /*1*/ y: L, /*2*/ z: M)
|
||||
public final val x: K
|
||||
public final val y: L
|
||||
public final val z: M
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class ClassWithTwoTypeParameters</*0*/ K, /*1*/ L> {
|
||||
public constructor ClassWithTwoTypeParameters</*0*/ K, /*1*/ L>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun test1(): L?
|
||||
public final fun test2(): K?
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class EmptyClass {
|
||||
public constructor EmptyClass()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class In</*0*/ in T> {
|
||||
public constructor In</*0*/ in T>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun </*0*/ K : T> getWithUpperBoundT(/*0*/ x: T): K
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun put(/*0*/ x: T): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Inv</*0*/ T> {
|
||||
public constructor Inv</*0*/ T>(/*0*/ x: T = ...)
|
||||
public final val prop_1: Inv<T>? = null
|
||||
public final val prop_2: T? = null
|
||||
public final val prop_3: T
|
||||
public final val prop_4: kotlin.Int = 10
|
||||
public final val x: T
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun get(): T
|
||||
public final fun getNullable(): T?
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final fun put(/*0*/ x: T): kotlin.Unit
|
||||
public final fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Out</*0*/ out T> {
|
||||
public constructor Out</*0*/ out T>(/*0*/ x: T = ...)
|
||||
public final val prop_1: Inv<out T>? = null
|
||||
public final val prop_2: T? = null
|
||||
public final val x: T
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun get(): T
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object case_1 {
|
||||
private constructor case_1()
|
||||
public final fun case_1(/*0*/ block: () -> kotlin.Unit): kotlin.Unit
|
||||
CallsInPlace(block, EXACTLY_ONCE)
|
||||
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class case_2 : ClassLevel3 {
|
||||
public constructor case_2()
|
||||
public final fun case_2_1(/*0*/ number: kotlin.Int?): kotlin.Boolean
|
||||
Returns(FALSE) -> number != null
|
||||
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun test1(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test2(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ fun test3(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final fun </*0*/ T> T?.case_2_2(): kotlin.Boolean
|
||||
Returns(FALSE) -> <this> !is Number
|
||||
|
||||
}
|
||||
Generated
+10
@@ -2386,6 +2386,11 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/3.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("4.kt")
|
||||
public void test4() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/4.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
@@ -2452,6 +2457,11 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/pos/1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("2.kt")
|
||||
public void test2() throws Exception {
|
||||
runTest("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/pos/2.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPos() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/pos"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user