Handle static readonly members like constants

This commit is contained in:
dcodeIO
2018-01-17 06:56:12 +01:00
parent 1662950f3c
commit 461daab2a2
4 changed files with 332 additions and 196 deletions

View File

@ -1436,6 +1436,7 @@ export class Global extends VariableLikeElement {
case ModifierKind.EXPORT: this.isExported = true; break;
case ModifierKind.CONST: this.isConstant = true; break;
case ModifierKind.DECLARE: this.isDeclared = true; break;
case ModifierKind.READONLY: this.isConstant = true; break;
case ModifierKind.STATIC: break; // static fields become globals
default: throw new Error("unexpected modifier");
}