Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jtenner opened this issue Mar 12, 2020 · 1 comment · Fixed by #1194
Closed

Comments

@jtenner
Copy link
Contributor

jtenner commented Mar 12, 2020

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)
@jtenner
Copy link
Contributor Author

jtenner commented Mar 20, 2020

Any news on this? I think I can to take a stab at this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant