Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/codegen/infrastructure/array-allocator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface ArrayAllocatorContext {
readonly symbolTable: SymbolTable;
emitError(message: string, loc?: SourceLocation, suggestion?: string): never;
getAst(): AST | undefined;
resolveExpressionTypeRich(expr: Expression): ResolvedType | null;
typeOf(expr: Expression): ResolvedType | null;
getArrayStorageStrategy(expr: Expression): "inlined" | "pointer";
}

Expand Down Expand Up @@ -391,7 +391,7 @@ export class ArrayAllocator {
// as an indexed-object-array element — the result is still an array,
// not an element. Short-circuit null so no legacy branch misclassifies
// it as element-info either.
const rich = this.ctx.resolveExpressionTypeRich(indexExpr.object);
const rich = this.ctx.typeOf(indexExpr.object);
if (rich && rich.arrayDepth === 1 && rich.fields) {
return { keys: rich.fields.keys, types: rich.fields.types, tsTypes: rich.fields.tsTypes };
}
Expand Down
Loading