Closed
Description
Consider the following code:
interface Base {
prop: number;
}
class Impl implements Base {
get prop(): number {
return 3;
}
}
let base = <Base>new Impl();
base.prop = 9;
This gives no error while compiling and even runs without any error/exception.
It should only work though, if prop
was declared readonly in the Base
.
Otherwise it should report that a setter is missing for prop
.