mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-09-17 18:17:29 +03:00
ec37b77b6e
Summary: Follow-up to https://github.com/facebook/prepack/pull/2212. Pull Request resolved: https://github.com/facebook/prepack/pull/2234 Differential Revision: D8788834 Pulled By: gaearon fbshipit-source-id: 08937736bed3df0ea13d5e7a3925fb2f58633d5c
21 lines
503 B
JavaScript
21 lines
503 B
JavaScript
// recover-from-errors
|
|
// expected errors: [{"location":{"start":{"line":12,"column":4},"end":{"line":12,"column":13},"source":"test/error-handler/call2.js"},"severity":"RecoverableError","errorCode":"PP0017"}]
|
|
|
|
let bar = { x: 1 };
|
|
let foo = global.__abstract
|
|
? __abstract("function", "(function() { return this.x; })")
|
|
: function() {
|
|
return this.x;
|
|
};
|
|
|
|
bar.foo = foo;
|
|
x = bar.foo();
|
|
bar.foo = function() {
|
|
return "abc";
|
|
};
|
|
y = bar.foo();
|
|
|
|
inspect = function() {
|
|
return "" + x + y;
|
|
};
|