Skip to content

Instantly share code, notes, and snippets.

@jtenner
Created May 23, 2019 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtenner/0b4b81a5b0f48958dbc69414b32f0610 to your computer and use it in GitHub Desktop.
Save jtenner/0b4b81a5b0f48958dbc69414b32f0610 to your computer and use it in GitHub Desktop.
class Vec3 {
x: f64;
y: f64;
z: f64;
}
const refPointer: usize = __alloc(5000);
const a = new Vec3();
const b = changetype<Vec3>(refPointer);
expect<Vec3>(a).toStrictEqual(b, "The allocated sizes of a and b are different");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment