Skip to content

TypeError: internref expected when map is passed to a function #2769

Description

@paciops

Bug description

Error TypeError: internref expected is raised by __lowerInternref when a Map is passed to a function

Steps to reproduce

create a .ts file with

export function mapError(map: Map<i32, String>): void {
  console.log(`Has one? ${map.has(1)}`);
}

compile with

asc assembly/index.ts --target debug && asc assembly/index.ts --target release

in a js file

import { mapError } from "../build/debug.js";
mapError(new Map())

AssemblyScript version

0.27.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions