Open Polymorphe57 opened 1 year ago
I'm not sure what's unexpected about this, trying to set a property that only has a getter seems like it should crash?
well, we probably expect that t-set
stays inside the template. It's kind of the same as this:
const a = 1;
{
let a = 2;
a += 5; // or whatever, do something with a;
}
Note that the example given by Mathieu is actually weird. Here is a different example, where we don't reuse the variable in the value: example
Oh I see the issue now. The problem is that while we encounter a boundary and try to set the property on the sub-object, because the property exists in the prototype chain, the getter/setter is invoked and we get a crash because there the property is getter-only on the prototype.
A crash occurs in the simple situation described
in playground