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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 25 10:23:32 UTC 2022


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12890 "fix issues 22130, 17635 - pure factory
functions" was merged into master:

- 8e5fc75426076f6e83dea731bc3e9f4b0935de3e by aG0aep6G:
  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