[Issue 22130] [REG2.080.1][DIP1000] pure factory functions stopped working

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 19 10:47:03 UTC 2021


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@aG0aep6G created dlang/dmd pull request #12890 "fix issues 22130, 17635 - pure
factory functions" fixing this issue:

- fix issues 22130, 17635 - pure factory functions

  Issue 22130 - [REG2.080.1][DIP1000] pure factory functions stopped working
  Issue 17635 - [REG 2.066.0] cannot convert unique immutable(int)** to
  immutable

  Immutable parameters are not needed for strong purity. Const is enough.
  Mutability in the return type is an additional condition on top of strong
  purity when considering side effects.

  The test case for issue 17635 was inverted without good reason in
  <https://github.com/dlang/dmd/pull/8048>. Flipping again to revert that
  mistake.

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

--


More information about the Digitalmars-d-bugs mailing list