prepack/test/serializer/pure-functions/AbstractPropertyRead4.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

20 lines
450 B
JavaScript

// does contain: "barone"
// does not contain: "23"
var __evaluatePureFunction = this.__evaluatePureFunction || (f => f());
let absFunc = global.__abstract ? __abstract("function", "(x => x)") : x => x;
let x, y;
__evaluatePureFunction(() => {
let obj1 = { foo: "bar" };
Object.freeze(obj1);
let obj2 = { one: obj1, two: 2 };
absFunc(obj2);
x = obj1.foo + "one";
y = obj2.two + "3";
});
inspect = function() {
return x + " " + y;
};