We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A code generator using setPrototype may generate code that assigns a value to the top-level prototype.
setPrototype
const v11 = { a: 1 }; const v20 = v11.__proto__; const newProto = { b: 2 }; v20.__proto__ = newProto; //TypeError: Immutable prototype object 'Object.prototype' cannot have their prototype set
const v11 = { a: 1 };
const v20 = v11.__proto__;
const newProto = { b: 2 };
v20.__proto__ = newProto;
top-level proto.txt
The text was updated successfully, but these errors were encountered:
Also a good point! I guess this is quite similar to issue #452 and the same fix should work here.
Sorry, something went wrong.
Yes, it's a category of issues. Thank you for your reply!
No branches or pull requests
Problem
A code generator using
setPrototype
may generate code that assigns a value to the top-level prototype.Example
const v11 = { a: 1 };
const v20 = v11.__proto__;
const newProto = { b: 2 };
v20.__proto__ = newProto;
//TypeError: Immutable prototype object 'Object.prototype' cannot have their prototype setThe problem is more likely to be reproduced with the following generators weighting.
top-level proto.txt
The text was updated successfully, but these errors were encountered: