No arithmetic for Chars (except for '-')

This commit is contained in:
Andrey Breslav
2011-11-12 18:37:26 +04:00
parent 89fa7cd29a
commit ff62489233
3 changed files with 7 additions and 6 deletions
@@ -104,7 +104,8 @@ public class PrimitiveTypesTest extends CodegenTestCase {
}
public void testChar() throws Exception {
binOpTest("fun foo(a: Char, b: Char): Int = a + b", 'A', (char) 3, (int) 'D');
// '+' is not available for Chars
binOpTest("fun foo(a: Char, b: Char): Int = a - b", 'D', (char) 3, (int) 'A');
}
public void testFloat() throws Exception {