generics-ast #1

Open
asegavac wants to merge 2 commits from generics-ast into main
Showing only changes of commit e7eb194b6c - Show all commits

View File

@@ -24,7 +24,7 @@ export interface Context {
environment: Record<string, NamedEntity>;
}
export function getAttr(ctx: Context, name: string, field: string) {
export function getAttr(ctx: Context, name: string, field: string): TypeUsage {
const struct = ctx.environment[name];
if (!struct || struct.namedEntity !== "NamedType") {
throw Error(`Unknown type ${name}`);