FIR: Reimplement conflicts checker to detect conflicts in different files

also pass correct ScopeSession to checkers
fixes some IC tests
This commit is contained in:
Ilya Chernikov
2021-02-17 21:49:07 +01:00
parent 3e458a1efb
commit 51a1cec08b
21 changed files with 379 additions and 144 deletions
@@ -8,7 +8,7 @@ package testsCase1
import libPackageCase1.*
import libPackageCase1Explicit.emptyArray
fun <T> Case1.emptyArray(): Array<T> = TODO()
<!CONFLICTING_OVERLOADS!>fun <T> Case1.emptyArray(): Array<T><!> = TODO()
class Case1(){
@@ -33,7 +33,7 @@ public fun <T> emptyArray(): Array<T> = TODO()
// FILE: LibtestsPack1.kt
// TESTCASE NUMBER: 1
package testsCase1
fun <T> Case1.emptyArray(): Array<T> = TODO()
<!CONFLICTING_OVERLOADS!>fun <T> Case1.emptyArray(): Array<T><!> = TODO()
public fun <T> emptyArray(): Array<T> = TODO()
@@ -46,7 +46,7 @@ package testsCase2
import libPackageCase2.*
import libPackageCase2Explicit.emptyArray
fun <T> Case2.emptyArray(): Array<T> = TODO()
<!CONFLICTING_OVERLOADS!>fun <T> Case2.emptyArray(): Array<T><!> = TODO()
class Case2(){
@@ -77,6 +77,6 @@ public fun <T> emptyArray(): Array<T> = TODO()
// FILE: LibtestsPack2.kt
// TESTCASE NUMBER: 2
package testsCase2
fun <T> Case2.emptyArray(): Array<T> = TODO()
<!CONFLICTING_OVERLOADS!>fun <T> Case2.emptyArray(): Array<T><!> = TODO()
public fun <T> emptyArray(): Array<T> = TODO()
@@ -5,8 +5,6 @@
annotation class Ann(val x: Int)
// TESTCASE NUMBER: 1
class Inv<T>
fun foo(i: Inv<@Ann(unresolved_reference) String>) {}
// TESTCASE NUMBER: 2
@@ -2,6 +2,4 @@
@Target(AnnotationTarget.TYPE)
annotation class Ann(val x: Int)
class Inv<T>
fun case_1(): Inv<@Ann(unresolved_reference) String> = TODO()
@@ -183,8 +183,8 @@ 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 {
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Symbol not found, for `otherpackage.Case13?`")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Symbol not found, for `otherpackage.Case13?`")!>x<!>.<!AMBIGUITY!>equals<!>(x)
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Symbol not found for otherpackage.Case13?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Symbol not found for otherpackage.Case13?")!>x<!>.<!AMBIGUITY!>equals<!>(x)
}<!>
// TESTCASE NUMBER: 14