Don't generate UNNECESSARY_SAFE_CALL on variables of generic type <T: Any?>

This commit is contained in:
Andrey Breslav
2012-10-25 12:00:27 +04:00
parent 3e38870ecc
commit b5385788a3
6 changed files with 70 additions and 6 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
fun Int?.optint() : Unit {}
val Int?.optval : Unit = Unit.VALUE
fun <T, E> T.foo(<warning>x</warning> : E, y : A) : T {
fun <T: Any, E> T.foo(<warning>x</warning> : E, y : A) : T {
y.plus(1)
y plus 1
y + 1.0