mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 00:21:32 +00:00
Fix tests in DiagnosticsTestWithStdLibGenerated with NI
This commit is contained in:
@@ -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>)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user