mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
18 lines
188 B
JavaScript
18 lines
188 B
JavaScript
const sym = Symbol();
|
|
|
|
class Foo {
|
|
[sym] () {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
class Bar extends Foo {
|
|
[sym] () {
|
|
return super[sym]() + 2;
|
|
}
|
|
}
|
|
|
|
let i = new Bar();
|
|
|
|
expect(i[sym]()).toBe(3);
|