KT-3174 Call resolver doesn't understand type is not-nullable after ?. safe call

#KT-3174 fixed
This commit is contained in:
Svetlana Isakova
2012-12-26 16:43:59 +04:00
parent 9b645589df
commit a299cec2eb
3 changed files with 22 additions and 2 deletions
@@ -0,0 +1,12 @@
//KT-3174 Call resolver doesn't understand type is not-nullable after ?. safe call
package a
fun <T: Any> T.test(): T = this
fun foo(a: Any?) = a?.test() // Error
fun <T> T.fff(l: MutableList<T>) = l.add(this)
fun test(s: String?, l: MutableList<String>) {
s?.fff(l)
}