Start typechecking generics

This commit is contained in:
nora 2023-11-06 20:41:49 +01:00
parent bf73203182
commit 01d4238269
15 changed files with 248 additions and 19 deletions

View file

@ -20,6 +20,7 @@ import {
superFoldItem,
varUnreachable,
TyRawPtr,
paramUnreachable,
} from "./ast";
import { GlobalContext } from "./context";
import { unreachable } from "./error";
@ -1257,6 +1258,8 @@ function argRetAbi(param: Ty): ArgRetAbi {
return [];
case "var":
varUnreachable();
case "param":
paramUnreachable();
case "error":
unreachable("codegen should not see errors");
}
@ -1314,6 +1317,8 @@ function wasmTypeForBody(ty: Ty): wasm.ValType[] {
return [];
case "var":
varUnreachable();
case "param":
paramUnreachable();
case "error":
unreachable("codegen should not see errors");
}