Fix tests in DiagnosticsTestWithStdLibGenerated with NI

This commit is contained in:
Dmitriy Novozhilov
2019-01-30 13:08:22 +03:00
parent 98810ba750
commit 0501a108c0
73 changed files with 507 additions and 218 deletions

View File

@@ -1,4 +1,5 @@
// !LANGUAGE: +ProhibitConcurrentHashMapContains
// !WITH_NEW_INFERENCE
// FULL_JDK
class A : java.util.concurrent.ConcurrentHashMap<String, Int>() {
@@ -28,8 +29,8 @@ fun main() {
"" in (hm as Map<String, Int>)
"" !in (hm as Map<String, Int>)
1 <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>in<!> (hm as Map<String, Int>)
1 <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>!in<!> (hm as Map<String, Int>)
1 <!OI;TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>in<!> (hm as Map<String, Int>)
1 <!OI;TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>!in<!> (hm as Map<String, Int>)
val a = A()
"" <!CONCURRENT_HASH_MAP_CONTAINS_OPERATOR_ERROR!>in<!> a
@@ -44,8 +45,8 @@ fun main() {
"" in (a as Map<String, Int>)
"" !in (a as Map<String, Int>)
1 <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>in<!> (a as Map<String, Int>)
1 <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>!in<!> (a as Map<String, Int>)
1 <!OI;TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>in<!> (a as Map<String, Int>)
1 <!OI;TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>!in<!> (a as Map<String, Int>)
val b = B()
"" <!CONCURRENT_HASH_MAP_CONTAINS_OPERATOR_ERROR!>in<!> b
@@ -58,8 +59,8 @@ fun main() {
"" in (b as Map<String, Int>)
"" !in (b as Map<String, Int>)
1 <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>in<!> (b as Map<String, Int>)
1 <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>!in<!> (b as Map<String, Int>)
1 <!OI;TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>in<!> (b as Map<String, Int>)
1 <!OI;TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>!in<!> (b as Map<String, Int>)
// Actually, we could've allow calls here because the owner explicitly declared as operator, but semantics is still weird
val c = C()
@@ -73,7 +74,7 @@ fun main() {
"" in (c as Map<String, Int>)
"" !in (c as Map<String, Int>)
1 <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>in<!> (c as Map<String, Int>)
1 <!TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>!in<!> (c as Map<String, Int>)
1 <!OI;TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>in<!> (c as Map<String, Int>)
1 <!OI;TYPE_INFERENCE_CONFLICTING_SUBSTITUTIONS!>!in<!> (c as Map<String, Int>)
}