mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* Fixes setter paratemer default value * Not changes doesn't mutate loose variable
10 lines
156 B
JavaScript
10 lines
156 B
JavaScript
const defaultValue = 1;
|
|
const obj = {
|
|
set field(num = defaultValue) {
|
|
this.num = num;
|
|
}
|
|
};
|
|
obj.field = void 0;
|
|
|
|
expect(obj.num).toBe(defaultValue);
|