Skip to content

Commit

Permalink
Test that struct member names are checked
Browse files Browse the repository at this point in the history
  • Loading branch information
samestep committed Aug 28, 2023
1 parent b823b99 commit 8a07848
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ describe("invalid", () => {
}),
).toThrow("variable is out of scope");
});

test("wrong struct member names", () => {
expect(() =>
fn([{ a: Real, b: Real }], { b: Real, c: Real }, (x) => x as any),
).toThrow("variable type mismatch");
});
});

describe("valid", () => {
Expand Down

0 comments on commit 8a07848

Please sign in to comment.