Skip to content

Compiler allows assignments to read-only properties #339

@mwisnicki

Description

@mwisnicki

http://typescript.codeplex.com/workitem/488

"use strict";
class SomeClass {
    public get someProperty(): string {
        return "some value";
    }
}
var someInstance = new SomeClass();
someInstance.someProperty = "another value"; //Run-time error. ECMAScript 5.1 - 11.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already createdSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions