From jmc at r-project.org  Thu Sep 18 16:20:14 2008
From: jmc at r-project.org (John Chambers)
Date: Thu, 18 Sep 2008 10:20:14 -0400
Subject: [Rd] setIs() with coerce= and method selection
Message-ID: <48D2639E.6030705@r-project.org>

A bug has been fixed that basically broke the use of setIs() to define 
explicit inheritance with coerce= and replace= methods.

For inherited methods to work in this case, the argument(s) need to be 
coerced by as() to the defined class in the signature.  This was not 
being done, meaning that any method that relied on the slots or other 
details would fail if the two classes had different representation.

This has been fixed.  Doing so required adding an option in setGeneric() 
to not use such inheritance.  Functions such as initialize() rely on the 
object they get really being the original argument, which is the case 
with simple inheritance but not always with coerce=.  The argument 
simpleInheritanceOnly= to setGeneric() adds this option.

Would owners of packages that use this form of setIs() please try out 
the fixed code, revision 46546.  (That no one has reported this bug 
suggests that the feature isn't used much.)

For details on the issue, see ?setIs and the simpleInheritanceOnly= 
argument in ?setGeneric.

John



[Rd] setIs() with coerce= and method selection
John Chambers