[Issue 22159] "==" causeses error for array of classes in safe method

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 30 12:42:11 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22159

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
Looks like this is a regression from 2.078.1 . Apparently, the
object.__equals!(C, C).__equals function was not @safe. However, since 2.094.1
this error has changed to: Error: incompatible types for array comparison:
`C[]` and `C[3]`. I suspect that the fix will require 2 parts: 1 change dmd to
not wrongfully error about incompatible types; 1 change to druntime to make the
comparison safe.

--


More information about the Digitalmars-d-bugs mailing list