Introduce FirInitializerTypeMismatchChecker

This commit is contained in:
vldf
2021-03-01 19:29:59 +03:00
committed by Mikhail Glukhikh
parent 7ed35e5c2b
commit 24f1f1221e
114 changed files with 647 additions and 285 deletions
@@ -6,5 +6,5 @@ package d
fun <T> asList(t: T) : List<T>? {}
fun main() {
val list : List<String> = asList("")
val list : List<String> = <!INITIALIZER_TYPE_MISMATCH!>asList("")<!>
}
@@ -22,12 +22,12 @@ fun test() {
doAction { bar(12) }
val u: Unit = bar(11)
val u: Unit = <!INITIALIZER_TYPE_MISMATCH!>bar(11)<!>
}
fun testWithoutInference(col: MutableCollection<Int>) {
doAction { col.add(2) }
val u: Unit = col.add(2)
val u: Unit = <!INITIALIZER_TYPE_MISMATCH!>col.add(2)<!>
}