EmptyIntersectionTypeChecker: drop questionable check of arguments

The situations with conflicting type arguments normally don't provoke
any runtime problems. Also, conflicts like A<T> VS A<SomeType> aren't
valid at all. Here we decided to remove them to avoid strange
and non-actionable warnings in user code.

#KT-54411 Fixed
This commit is contained in:
Mikhail Glukhikh
2022-11-24 18:07:40 +01:00
committed by Space Team
parent 832baf81e5
commit 2a1a5c6936
51 changed files with 42 additions and 420 deletions
@@ -18,7 +18,7 @@ fun test() {
callFun<String, Wrapper<String>>(::createWrapper)
callFun<Int, Wrapper<Number>>(::createWrapper)
callFun<String, Wrapper<*>>(::createWrapper)
<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION!>callFun<!><String, Wrapper<Int>>(::createWrapper)
callFun<String, Wrapper<Int>>(::createWrapper)
callFun<Int, Wrapper<Int>>(::createWrapper).baz(::foo)
}
@@ -18,7 +18,7 @@ fun test() {
callFun<String, Wrapper<String>>(::createWrapper)
callFun<Int, Wrapper<Number>>(::createWrapper)
callFun<String, Wrapper<*>>(::createWrapper)
<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>callFun<!><String, Wrapper<Int>>(::createWrapper)
callFun<String, Wrapper<Int>>(::createWrapper)
callFun<Int, Wrapper<Int>>(::createWrapper).baz(::foo)
}