assemblyscript/tests/compiler/class-with-boolean-field.ts
Alan Pierce ce2bf00d62 Fix crash when assigning to bool class fields (#95)
With `Type.bool`, size is 1, so dividing by 8 isn't the right way to convert to byteSize. Instead, we need to use the `byteSize` property that does the proper ceiling division.
2018-05-05 23:54:39 +02:00

10 lines
121 B
TypeScript

class A {
boolValue: bool;
}
export function test(): bool {
let a: A;
a.boolValue = true;
return a.boolValue;
}