Skip to content

Commit

Permalink
[Sema] increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
isuckatcs committed Jun 30, 2024
1 parent ca98575 commit 5849fcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/sema/return.al
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ fn foo(): number {
fn bar(): number {
// CHECK: [[# @LINE + 1 ]]:5: error: expected a return value
return;

// CHECK: [[# @LINE + 1 ]]:12: error: symbol 'y' not found
return y;
}

fn main(): void {
Expand Down
3 changes: 3 additions & 0 deletions test/sema/var_decl.al
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ fn main(): void {
let x4: number;

let x5: number = bar();

// CHECK: [[# @LINE + 1 ]]:22: error: symbol 'y' not found
let x6: number = y;
}

0 comments on commit 5849fcc

Please sign in to comment.