Skip to content

Readonly vars getting typecast to "false" instead of "boolean" #13113

Description

TypeScript Version: 2.1.4

Code

class blah {
    private readonly _something = false;
    constructor() {
        this._something = true;
    }
}

Expected behavior:
Doesn't cause an error

Actual behavior:
Causes an error

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions