From m@ech|er @end|ng |rom @t@t@m@th@ethz@ch  Mon May 10 14:07:55 2021
From: m@ech|er @end|ng |rom @t@t@m@th@ethz@ch (Martin Maechler)
Date: Mon, 10 May 2021 14:07:55 +0200
Subject: [Rd] R-devel new warning: no longer be an S4 object
In-Reply-To: <CAOO9MKVd0EYf8knZuZhbhAGy-J80b2qovhDAmR08Qe3077GGMg@mail.gmail.com>
References: <CAOO9MKVd0EYf8knZuZhbhAGy-J80b2qovhDAmR08Qe3077GGMg@mail.gmail.com>
Message-ID: <24729.8731.146971.424258@stat.math.ethz.ch>

>>>>> 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'))



[Rd] R-devel new warning: no longer be an S4 object
Martin Maechler