[Rd] R-devel new warning: no longer be an S4 object
Martin Maechler
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Mon May 10 14:07:55 CEST 2021
>>>>> Jan Gorecki
>>>>> on Mon, 10 May 2021 12:42:09 +0200 writes:
> Hi R-devs,
> R 4.0.5 gives no warning. Is it expected? Searching the news for "I("
> doesn't give any info. Thanks
> z = I(getClass("MethodDefinition"))
Now what exactly did you intend with the above line ?
I'm bold and say (for the moment) that the above line has always
been very dubious if not misleading,
and this "fact" is now finally revealed by the warning
> Warning message:
> In `class<-`(x, unique.default(c("AsIs", oldClass(x)))) :
> Setting class(x) to multiple strings ("AsIs", "classRepresentation",
> ...); result will no longer be an S4 object
So, yes, the change has been on purpose to warn about problems,
you'd get later when trying to work with 'z'.
> [[alternative HTML version deleted]]
(your fault: do use plain text aka MIME time 'text/plain'))
More information about the R-devel
mailing list