Hi everyone, maybe is a case of an invalid numeric escape (non-octal-eight) in strict mode, but the same occurs using the strict mode and without it. Is this an expected behavior of JavaScriptCore? (implementation-dependent) version: 262693 OS: Linux Ubuntu 19.10 x64 Steps to reproduce: print(`\8`); Actual results: SyntaxError: untagged template literal contains invalid escape sequence Expected results: 8 The same occurs in strict mode "use strict"; print(`\8`); V8, SpiderMonkey, Chakra works as expected. cinfuzz
Based on the spec: https://tc39.es/ecma262/#sec-literals-string-literals https://tc39.es/ecma262/#sec-additional-syntax-string-literals https://tc39.es/ecma262/#sec-template-literal-lexical-components https://tc39.es/ecma262/#sec-static-semantics-template-early-errors It would appear that our behavior is correct -- namely, it's only non-template strings that should support numeric escapes other than '\0'. If so, then the thing to do here would be to add test262 cases for the other engines to fix.
(In reply to Ross Kirsling from comment #1) > It would appear that our behavior is correct -- namely, it's only > non-template strings that should support numeric escapes other than '\0'. Oops, I ended my sentence too early. Should be "... in sloppy mode."
Closing here but opened https://github.com/tc39/test262/issues/2653 for the remaining work.