Skip to content

Can use old octal in property name. #813

@tuchida

Description

@tuchida

Test case

'use strict';
({ 01: 1 });

Output

[object Object]

Expected behavior

SyntaxError: Old octal numbers prohibited in strict mode.

That must check old octal when Token.NUMBER.

case Token.NUMBER: {
consumeToken();
String s = ts.getString();
if (this.inUseStrictDirective && ts.isNumberOldOctal()) {
reportError("msg.no.old.octal.strict");
}

But that haven't checked it objliteralProperty.
case Token.NUMBER:
pname = new NumberLiteral(
ts.tokenBeg, ts.getString(), ts.getNumber());
break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues considered a bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions