Closed
Description
As @mhegazy said in #6717 deleting of readonly properties should follow the same rules as writing.
TypeScript Version: 2.0.3
Code
class Foo {
public readonly bar: Bar;
constructor() {
this.bar = createBar(...);
}
public destroy() {
delete this.bar; // here
}
}
Expected behavior:
tsc
should give a compile-time error
Actual behavior:
No error