[Issue 21538] Overriding with more attributes on delegate parameter is allowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 5 00:45:05 UTC 2021


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

--- Comment #6 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel created dlang/dmd pull request #13267 "Fix 21538,20904:
Correct implicitConvTo order for delegate parameters in `Type.covariant`"
fixing this issue:

- Fix 21538,20904: Correct implicitConvTo order for delegate parameters...

  ... in `Type.covariant`

  The ordering was inversed when compared to function pointers. That caused
  the check to accept e.g. less restrictive attributes for callbacks.

  Also changed the equality checks for `TypeFuntion` and `TypeDelegate`
  to `equals` because `==` didn't call the former and hence caused problems
  for duplicate instances.

https://github.com/dlang/dmd/pull/13267

--


More information about the Digitalmars-d-bugs mailing list