KT-3461 Nullable argument allowed where shouldn't be

#KT-3461 Fixed
This commit is contained in:
Svetlana Isakova
2013-04-01 19:07:04 +04:00
parent dd0acf6013
commit 12c0a2cb77
5 changed files with 47 additions and 16 deletions
@@ -0,0 +1,15 @@
//KT-3461 Nullable argument allowed where shouldn't be
package a
class F {
fun p(): String? = null
}
fun foo(<!UNUSED_PARAMETER!>s<!>: String) {}
fun r(): Int? = null
fun test() {
foo(<!TYPE_MISMATCH!>F().p()<!>)
foo(<!TYPE_MISMATCH!>r()<!>)
}