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
@@ -4,7 +4,7 @@ package outer
fun Int?.optint() : Unit {}
val Int?.optval : Unit = Unit.VALUE
fun <T, E> T.foo(<!UNUSED_PARAMETER!>x<!> : E, y : A) : T {
fun <T: Any, E> T.foo(<!UNUSED_PARAMETER!>x<!> : E, y : A) : T {
y.plus(1)
y plus 1
y + 1.0