22 lines
289 B
JavaScript
22 lines
289 B
JavaScript
"use strict";
|
|
class Hello {
|
|
toString() {
|
|
return 'hello';
|
|
}
|
|
}
|
|
|
|
class Outer extends Hello {
|
|
constructor() {
|
|
super();
|
|
class Inner {
|
|
[super.toString()]() {
|
|
return 'hello';
|
|
}
|
|
}
|
|
|
|
return new Inner();
|
|
}
|
|
}
|
|
|
|
expect(new Outer().hello()).toBe('hello');
|