Skip to content

Commit c23a67d

Browse files
committed
Add parenthesized expression test
1 parent 2a367b1 commit c23a67d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/code/assign.kyo

+20
Original file line numberDiff line numberDiff line change
@@ -762,3 +762,23 @@ fn main() i32 {
762762
var y = +++x;
763763
return y;
764764
}
765+
766+
// NAME ParenthesizedPrecedence
767+
// ERR 0
768+
// RET 16
769+
770+
fn main() i32 {
771+
var x = 5;
772+
var y = (x + 3) * 2;
773+
return y;
774+
}
775+
776+
// NAME NonParenthesizedPrecedence
777+
// ERR 0
778+
// RET 11
779+
780+
fn main() i32 {
781+
var x = 5;
782+
var y = x + 3 * 2;
783+
return y;
784+
}

0 commit comments

Comments
 (0)