KT-877 - wrong codegen for unary plus

This commit is contained in:
Alex Tkachman
2012-01-02 09:49:04 +02:00
parent c3725054eb
commit cde54d59bd
3 changed files with 19 additions and 1 deletions
@@ -0,0 +1,9 @@
fun box() : String {
var a : Int = -1
if((+a) != -1) return "fail 1"
a = 1
if((+a) != 1) return "fail 2"
if((+-1) != -1) return "fail 3"
if((-+a) != -1) return "fail 4"
return "OK"
}