Closed jl5000 closed 10 months ago
I don't think we can create a better error "unused argument" because class_a()
is a regular function with one argument for each settable property.
The second problem is really #352; it shouldn't be possible to override properties in subclasses (at least in the way that properties are implemented in S7).
I've been using S7 to create different types of parent and child classes and I'm seeing some unexpected results.
I create
class_a
below which works as expected, apart from the unhelpful error message when trying to set a read-only property.When creating
class_b
I am expecting the property definition of the parent class to be overwritten, allowing x to be undefined (and therefore an empty chr vector). However it complains that it is NULL. when I try setting it to a non-empty value it still errors.Created on 2023-10-08 with reprex v2.0.2