AssemblyScript / assemblyscript

A TypeScript-like language for WebAssembly.
https://www.assemblyscript.org
Apache License 2.0
16.87k stars 658 forks source link

The docs didn't state the `v128.extract_lane`'s `idx` arg needs to compile time constant #2877

Open hinum opened 6 days ago

hinum commented 6 days ago

Bug description

as the name suggested, the docs entry for v128.extract_lane didn't state that the idx argument need to be compile time constant

Steps to reproduce

  1. try to compile this
    let a = 0
    v128.extract_lane<u8>(v128.splat<u8>(0), a)
  2. compile error thrown

AssemblyScript version

not sure if relevant but 0.27.30

HerrCai0907 commented 1 day ago

related declarations are placed in std/assembly/index.d.ts.