From b86affaa3a8c6c979b235875f1f64e927191bc6a Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Mon, 21 Jul 2014 20:50:18 +0400 Subject: [PATCH] Assignment operations test fix: x is a byte, x += 2 translated to x = x+2, but type of (x+2) currently is Int, so it's not compiled because Int can't be stored in Byte. Maybe we need to think about what should be a result of sum of to Bytes, but currently it's still Int --- compiler/testData/codegen/boxWithStdlib/regressions/kt344.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/testData/codegen/boxWithStdlib/regressions/kt344.kt b/compiler/testData/codegen/boxWithStdlib/regressions/kt344.kt index 89725ca7f27..a83fbaf9354 100644 --- a/compiler/testData/codegen/boxWithStdlib/regressions/kt344.kt +++ b/compiler/testData/codegen/boxWithStdlib/regressions/kt344.kt @@ -92,7 +92,7 @@ fun t6() : Boolean { val y = x + 22 val foo = { x = (x + 20.toByte() + y).toByte() - x += 2 + x = (x + 2).toByte() x-- Unit }