diff --git a/compiler/forget/src/HIR/ObjectShape.ts b/compiler/forget/src/HIR/ObjectShape.ts index ff76ad0ae2..e5790bbe9a 100644 --- a/compiler/forget/src/HIR/ObjectShape.ts +++ b/compiler/forget/src/HIR/ObjectShape.ts @@ -6,7 +6,7 @@ */ import invariant from "invariant"; import { Effect } from "./HIR"; -import { BuiltInType, FunctionType, PrimitiveType } from "./Types"; +import { BuiltInType, FunctionType, PolyType, PrimitiveType } from "./Types"; const PRIMITIVE_TYPE: PrimitiveType = { kind: "Primitive", @@ -58,7 +58,7 @@ function addShape( export type FunctionSignature = { positionalParams: Array; restParam: Effect | null; - returnType: BuiltInType | null; + returnType: BuiltInType | PolyType; calleeEffect: Effect; }; @@ -85,7 +85,7 @@ addShape(BUILTIN_SHAPES, ArrayShapeId, [ addFunction(BUILTIN_SHAPES, [], { positionalParams: [Effect.Read], restParam: null, - returnType: null, + returnType: { kind: "Poly" }, calleeEffect: Effect.Read, }), ], diff --git a/compiler/forget/src/HIR/Types.ts b/compiler/forget/src/HIR/Types.ts index 933ef3aa20..9e17dd086d 100644 --- a/compiler/forget/src/HIR/Types.ts +++ b/compiler/forget/src/HIR/Types.ts @@ -9,7 +9,7 @@ import { Hook } from "./Hooks"; export type BuiltInType = PrimitiveType | FunctionType | ObjectType; -export type Type = BuiltInType | HookType | PhiType | PolyType | TypeVar; +export type Type = BuiltInType | HookType | PhiType | TypeVar | PolyType; export type PrimitiveType = { kind: "Primitive" }; export type HookType = { kind: "Hook";