Reference classes: assignments to fields

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Reference classes: assignments to fields

John Chambers-2
In R-devel, a recent change (Rev. 56572) makes assignments to fields in
reference classes consistent with assignments to slots in S4 classes,
when the field was declared with a class in the call to setRefClass().

The value assigned must come from the declared class for the field, if
any, or from a subclass of that class.  Previously, if the field had a
declared class the value for assignment was unconditionally coerced to
that class.

The added test may produce new error messages, e.g., if you declare a
field "integer" and assign a numeric, such as 1 rather than 1L.


[hidden email] mailing list