Files
babel/test/fixtures/transformation/es6-classes-exec/super-change-proto.js
Sebastian McKenzie 7a6e568940 clean up classes output
2015-03-06 02:25:24 +11:00

22 lines
332 B
JavaScript

var log = '';
class Base {
p() { log += '[Base]'; }
}
class OtherBase {
p() { log += '[OtherBase]'; }
}
class Derived extends Base {
p() {
log += '[Derived]';
super.p();
Derived.prototype.__proto__ = OtherBase.prototype;
super.p();
}
}
new Derived().p();
assert.equal(log, '[Derived][Base][OtherBase]');