New issue
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
Normative: Add missing GetValue() to TemplateLiteral evaluation #1298
Conversation
spec.html
Outdated
1. Let _sub_ be the result of evaluating |Expression|. | ||
1. ReturnIfAbrupt(_sub_). | ||
1. Let _subRef_ be the result of evaluating |Expression|. | ||
1. ReturnIfAbrupt(_subRef_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line isn't needed, since it's covered by step 1 of https://tc39.github.io/ecma262/#sec-getvalue
spec.html
Outdated
1. Let _sub_ be the result of evaluating |Expression|. | ||
1. ReturnIfAbrupt(_sub_). | ||
1. Let _subRef_ be the result of evaluating |Expression|. | ||
1. ReturnIfAbrupt(_subRef_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here
spec.html
Outdated
1. Let _sub_ be the result of evaluating |Expression|. | ||
1. ReturnIfAbrupt(_sub_). | ||
1. Let _subRef_ be the result of evaluating |Expression|. | ||
1. ReturnIfAbrupt(_subRef_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
8fc09e3
to
cebb144
Compare
@ljharb Fixed. |
As currently spec'd, it is an undefined behavior when an Expression that evaluates to a Reference is present in a TemplateLiteral, as the Reference value would be directly passed into ToString which expects an ECMAScript language value. Fixes tc39#935.
cebb144
to
44e8058
Compare
As currently spec'd, it is an undefined behavior when an Expression that evaluates to a Reference is present in a TemplateLiteral, as the Reference value would be directly passed into ToString which expects an ECMAScript language value.
Fixes #935.
Quite similar to #1286.