If you use a default value for a property and a constructor for creating the object, the class check is applied before the NULL check resulting in this message
Error: <class> object properties are invalid:
- @prop must be S3<base_class>, not <NULL>
This leaves users the only option of setting a default value in the constructor call itself which feels clunky and defeats the purpose of the default option.
If you use a default value for a property and a constructor for creating the object, the class check is applied before the
NULL
check resulting in this messageThis leaves users the only option of setting a default value in the constructor call itself which feels clunky and defeats the purpose of the
default
option.