prepack/test/error-handler/call2.js
Dan Abramov ec37b77b6e Run Prettier for serializer tests too (#2234)
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
2018-07-11 03:55:11 -07:00

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;
};