[Rd] Reference classes: assignments to fields
John Chambers
jmc at r-project.org
Sun Jul 31 20:27:44 CEST 2011
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.
John
More information about the R-devel
mailing list