[FIR] Add NO_THIS & INSTANCE_ACCESS_BEFORE_SUPER_CALL
This commit is contained in:
+3
-3
@@ -32,7 +32,7 @@ fun case_2() {
|
||||
class case_4 : ClassLevel3() {
|
||||
|
||||
fun <T : Number?>T.case_4_1(): Boolean {
|
||||
contract { returns(false) implies (this@case_4 !is ClassLevel1) }
|
||||
contract { returns(false) implies (<!UNRESOLVED_LABEL!>this@case_4<!> !is ClassLevel1) }
|
||||
return this == null
|
||||
}
|
||||
|
||||
@@ -60,12 +60,12 @@ class case_4 : ClassLevel3() {
|
||||
class case_5<T> : ClassLevel5() {
|
||||
inner class case_5_1 {
|
||||
fun <K : Number?>K.case_5_1_1() {
|
||||
contract { returns() implies (this@case_5_1 !is ClassLevel1 && this@case_5_1 != null || this@case_5 is ClassLevel1 && this@case_5_1_1 is Float) }
|
||||
contract { returns() implies (<!UNRESOLVED_LABEL!>this@case_5_1<!> !is ClassLevel1 && <!UNRESOLVED_LABEL!>this@case_5_1<!> != null || <!UNRESOLVED_LABEL!>this@case_5<!> is ClassLevel1 && this@case_5_1_1 is Float) }
|
||||
if (!(this@case_5_1 !is ClassLevel1 && this@case_5_1 != null || this@case_5 is ClassLevel1 && this is Float)) throw Exception()
|
||||
}
|
||||
|
||||
fun case_5_1_2() {
|
||||
contract { returns() implies (this@case_5_1 !is ClassLevel1 || this@case_5 is ClassLevel1 || this@case_5_1 == null) }
|
||||
contract { returns() implies (<!UNRESOLVED_LABEL!>this@case_5_1<!> !is ClassLevel1 || <!UNRESOLVED_LABEL!>this@case_5<!> is ClassLevel1 || <!UNRESOLVED_LABEL!>this@case_5_1<!> == null) }
|
||||
if (!(this@case_5_1 !is ClassLevel1 || this@case_5 is ClassLevel1 || this@case_5_1 == null)) throw Exception()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ fun case_12(x: TypealiasNullableStringIndirect, y: TypealiasNullableStringIndire
|
||||
else "-1"
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>otherpackage.Case13?<!>) =
|
||||
fun case_13(x: <!UNRESOLVED_REFERENCE!>otherpackage.Case13?<!>) =
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Can't resolve when expression")!>if ((x == null !is Boolean) !== true) {
|
||||
throw Exception()
|
||||
} else {
|
||||
@@ -189,7 +189,7 @@ fun case_13(x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENC
|
||||
|
||||
// TESTCASE NUMBER: 14
|
||||
class Case14 {
|
||||
val x: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>otherpackage.Case14?<!>
|
||||
val x: <!UNRESOLVED_REFERENCE!>otherpackage.Case14?<!>
|
||||
init {
|
||||
x = <!UNRESOLVED_REFERENCE!>otherpackage<!>.<!UNRESOLVED_REFERENCE!>Case14<!>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user