diff --git a/src/semantics/__tests__/check-types.test.ts b/src/semantics/__tests__/check-types.test.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/semantics/__tests__/fixtures/check-types.ts b/src/semantics/__tests__/fixtures/check-types.ts new file mode 100644 index 00000000..b2fdccdf --- /dev/null +++ b/src/semantics/__tests__/fixtures/check-types.ts @@ -0,0 +1,21 @@ +export const throwsWithMissingField = ` +use std::all + +obj Point extends Vec { + x: i32, + y: i32, + z: i32 +} + +pub fn main() -> i32 + let vec = Point { x: 1, y: 2 } + vec.x +`; + +export const throwsWithBadReturn = ` +use std::all + +pub fn main() -> i32 + let fl = 1.23 + fl +`;