KT-756 incorrect intrinsics on nullable numbers

This commit is contained in:
Alex Tkachman
2011-12-06 15:03:26 +02:00
parent 29ebb124c8
commit ecb323a13e
7 changed files with 85 additions and 25 deletions
@@ -0,0 +1,12 @@
namespace demo_range
fun Int?.plus() : Int = this.sure().plus()
fun Int?.dec() : Int = this.sure().dec()
fun Int?.inc() : Int = this.sure().inc()
fun Int?.minus() : Int = this.sure().minus()
fun box() : String {
val x : Int? = 10
System.out?.println(x?.inv())// * x?.plus() * x?.dec() * x?.minus() as Number)
return "OK"
}