What version of Bun is running?
1.1.12
What platform is your computer?
Linux 5.15.0-107-generic x86_64 x86_64
What steps can reproduce the bug?
Considering following TS code:
abstract class Cparent {
public parentVal: string;
constructor() {
this.parentVal = 'parent';
this.init();
}
init() { }
}
class Achild extends Cparent {
public childVal!: string;
constructor() {
super();
}
override init() {
this.childVal = 'child';
}
}
const a = new Achild();
console.log(a.parentVal, a.childVal);
What is the expected behavior?
Expected behavior when compiling with TS:
"use strict";
class Cparent {
constructor() {
this.parentVal = 'parent';
this.init();
}
init() { }
}
class Achild extends Cparent {
constructor() {
super();
}
init() {
this.childVal = 'child';
}
}
const a = new Achild();
console.log(a.parentVal, a.childVal);
And when running:
What do you see instead?
When building with bun:
// buntest.ts
class Cparent {
parentVal;
constructor() {
this.parentVal = "parent";
this.init();
}
init() {
}
}
class Achild extends Cparent {
childVal;
constructor() {
super();
}
init() {
this.childVal = "child";
}
}
var a = new Achild;
console.log(a.parentVal, a.childVal);
When running:
Additional information
No response
What version of Bun is running?
1.1.12
What platform is your computer?
Linux 5.15.0-107-generic x86_64 x86_64
What steps can reproduce the bug?
Considering following TS code:
What is the expected behavior?
Expected behavior when compiling with TS:
And when running:
What do you see instead?
When building with bun:
When running:
Additional information
No response