Skip to content

<i32>I++ compile failed #3049

Description

@Changqing-JING

Bug description

// bad.ts
export function main(): void {
  let v = 1;
  <i32>v++;
}

Steps to reproduce

> node ~/fuzz_emerging_compilers/AssemblyScript/assemblyscript/bin/asc --optimizeLevel 2 --shrinkLevel 2 bad.ts -o bad.wasm

ERROR TS2357: The operand of an increment or decrement operator must be a variable or a property access.
   :
 2 │ <i32>v++;
   │ ~~~~~~
   └─ in bad.ts(2,1)

FAILURE 1 parse error(s)

AssemblyScript version

v0.28.20

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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