* Update super property get/set/call in loose mode Follows the plan laid out in https://github.com/babel/babel/pull/7553#issuecomment-381434519. With #7691, this closes #7553, closes #4312. * Post #7772 * Memoized property
25 lines
376 B
JavaScript
25 lines
376 B
JavaScript
"use strict";
|
|
class Base {
|
|
set test(v) {
|
|
throw new Error("gobbledygook");
|
|
}
|
|
}
|
|
|
|
class Obj extends Base {
|
|
call() {
|
|
return super.test();
|
|
}
|
|
|
|
test() {
|
|
throw new Error("gobbledygook");
|
|
}
|
|
}
|
|
|
|
const obj = new Obj();
|
|
expect(() => {
|
|
obj.call();
|
|
|
|
// Asser that this throws, but that it's not
|
|
// a gobbledygook error that is thrown
|
|
}).toThrowError(TypeError)
|