You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We were not calling ToString correctly for template literal
placeholder expressions. This lead to cases where we ended up with
calling valueOf instead as required by a + b.
Fixesgoogle#1836
arv
added a commit
to arv/traceur-compiler
that referenced
this issue
Mar 24, 2015
We were not calling ToString correctly for template literal
placeholder expressions. This lead to cases where we ended up with
calling valueOf instead as required by a + b.
Fixesgoogle#1836
If you've been following the discussion on the PR it is not clear we care about fixing this. To fix this we need to make sure that we throw for symbols which makes the generated code pretty ugly (and slower).
Maybe Traceur should follow Babel and use a spec/loose mode?
I think that's a good approach. I'm concerned about performance too since template literals are almost certainly going to appear in hot code. Not sure whether it's a good idea to do it by default though. Perhaps it can be considered the same as the typeof symbol rewriting (opt-in)?
According to 12.2.8.5 template literal expressions should be coerced to strings.
Actual:
Expected:
Relevant V8 bug report here.
The text was updated successfully, but these errors were encountered: