Skip to content

Commit

Permalink
[Parser] added additional assignment tests
Browse files Browse the repository at this point in the history
  • Loading branch information
isuckatcs committed Jun 30, 2024
1 parent b820005 commit 822e08d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/parser/assignment.al
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ fn bar(): number { return 1.0; }
fn main(): void {
// CHECK: [[# @LINE + 1 ]]:11: error: expected variable on the LHS of an assignment
bar() = 3.0;

// CHECK: [[# @LINE + 1 ]]:11: error: expected ';' at the end of statement
a = b = 4.0;

a = 4.0;
// CHECK: Assignment:
// CHECK-NEXT: DeclRefExpr: a
// CHECK-NEXT: NumberLiteral: '4.0'
}

0 comments on commit 822e08d

Please sign in to comment.