You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since this is valid TypeScript, the expected behavior is a console output of 3
What do you see instead?
I get the following output:
5 | class Parent {} 6 | 7 | class Child extends Parent { 8 | calc: number; 9 | 10 | constructor(readonly value: number) { ^ReferenceError: 'super()' must be called in derived constructor before accessing |this| or returning non-object. at new Child (./src/index.ts:10:23) at ./src/index.ts:16:10
Additional information
When not extending another class, the code works fine. Also, when making the value property not readonly, the code works fine.
The text was updated successfully, but these errors were encountered:
Looks like a minification bug. This happens because we default to enabling --minify-syntax in the runtime in v0.6. You can switch to 0.5.9 and it should work there.
What version of Bun is running?
0.6.0
What platform is your computer?
Darwin 22.4.0 arm64 arm
What steps can reproduce the bug?
Create a file with the following code:
And run it with
bun
What is the expected behavior?
Since this is valid TypeScript, the expected behavior is a console output of
3
What do you see instead?
I get the following output:
Additional information
When not extending another class, the code works fine. Also, when making the
value
property notreadonly
, the code works fine.The text was updated successfully, but these errors were encountered: