Skip to content

Properties that return v128 cause compiler error even though they are conditionally used #1162

Closed
@jtenner

Description

@jtenner
class ExampleClass {
  a: f64;
  b: f64;

  get ab(): v128 {
    return v128.load(changetype<usize>(this), offsetof<ExampleClass>("a"));
  }
}

if (!ASC_FEATURE_SIMD) {
  let a = new ExampleClass();
  a.a = 1;
}

Minimal reproduction causes a compiler error that reports like this:

  ERROR TS2304: Cannot find name 'v128'.

     get ab(): v128 {
               ~~~~
   in simd-error.ts(6,12)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions