Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Error messages for ++ and -- #749

Closed
wants to merge 1 commit into from
Closed

Error messages for ++ and -- #749

wants to merge 1 commit into from

Conversation

hermanventer
Copy link
Contributor

}
}
oldExpr.throwIfNotConcrete();
invariant(oldExpr instanceof ConcreteValue);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this true? Is there no other unary operator but ++ and --?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no update operators other than ++ and --, but good point, the if statement in line 39 is redundant in that case. I was seduced by the old code.

facebook-github-bot pushed a commit that referenced this pull request Jun 26, 2017
Summary:
Complain if the operand might be a badly behaved abstract value.

[PP0008 might be a symbol or an object with an unknown valueOf or toString or Symbol.toPrimitive method](https://github.com/facebook/prepack/wiki/PP0008)
Closes #749

Differential Revision: D5320843

Pulled By: hermanventer

fbshipit-source-id: 37f7fa789430109899c2cfa00ce50f7c7e1cc6ec
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants