Skip to content

WASM inference: _is_pair_type_name misses bare "Array" type name #313

@aallan

Description

@aallan

Bug

_is_pair_type_name in vera/wasm/inference.py checks type_name.startswith("Array<") but not bare "Array". When a slot ref has type_name="Array" with separate type_args, the function returns False, causing the WASM if-else to omit the (result i32 i32) annotation.

Impact

Any function with a generic @Array<T> parameter fails to compile when the body contains an if-else that returns the array — the WASM validator rejects the type mismatch.

Fix

Added type_name == "Array" check to _is_pair_type_name. Fixed in the feat/array-operations branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions