Closed
Description
The binder issues an error on all octal literals that are in strict mode: inside a class or module.
The checker issues an error on all octal literal types, and octal literal values when the target is es5
or higher or the value is in the initialiser of an enum member.
export enum E {
A = 12 + 01
}
const orbitol: 01 = 01
Expected: one error on each 01
.
Actual: Two errors on each 01
.
This means that octal literals nearly always get two errors, because most code targets es5 or higher and is inside a module.
The checker implementation is a bit flabby and inefficient, but is probably the best place to consolidate the errors -- and efficiency doesn't matter much for syntax that's hardly ever used. I don't think it would be difficult to re-create the equivalent of the binder's inStrictMode
flag.