February 24, 2021
https://issues.dlang.org/show_bug.cgi?id=17635

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |razvan.nitu1305@gmail.com
         Resolution|---                         |FIXED

--- Comment #10 from RazvanN <razvan.nitu1305@gmail.com> ---
(In reply to ag0aep6g from comment #9)
> The original test case has been fixed, but it can be made to fail again by changing the parameter type slightly. As far as I can tell, the parameter type shouldn't matter, as long as it's not mutable.
> 
> ----
> alias T = immutable int;
> 
> T** f(I)(const I input) pure
> {
>     T** output;
>     return output;
> }
> 
> void main()
> {
>     /* Not regressions in 2.066 (i.e. 2.065 also rejected these): */
> 
>     T*** a1;
>     immutable T** r1 = f(a1);
> 
>     static struct S2 { T* foo; }
>     S2* a2;
>     immutable T** r2 = f(a2);
> 
>     /* But this one compiles with 2.065, so it's another regression: */
> 
>     static struct S3 { T foo; }
>     S3* a3;
>     immutable T** r3 = f(a3);
> }
> ----
> 
> Tested with DMD64 D Compiler v2.076.1-b1-166-g2f98e66e5.
> 
> Reopening. Let me know if I should file a new issue (or multiple ones)
> instead.

Yes, the procedure is that every bug report is associated with one test case. The test case for this specific bug has been fixed. Furthermore, the proposed test case has never compiled with dmd, therefore it is not a regression.

I am closing this, please file the new test case as a new bug report.

--
February 24, 2021
https://issues.dlang.org/show_bug.cgi?id=17635

--- Comment #11 from ag0aep6g <ag0aep6g@gmail.com> ---
(In reply to RazvanN from comment #10)
> I am closing this, please file the new test case as a new bug report.

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

--
July 19, 2021
https://issues.dlang.org/show_bug.cgi?id=17635

ag0aep6g <ag0aep6g@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=22130

--
July 19, 2021
https://issues.dlang.org/show_bug.cgi?id=17635

ag0aep6g <ag0aep6g@gmail.com> changed:

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

--- Comment #12 from ag0aep6g <ag0aep6g@gmail.com> ---
The exact test case from this issue fails again in 2.096.0 when compiling with `-preview=dip1000`. Reopening.

--
July 19, 2021
https://issues.dlang.org/show_bug.cgi?id=17635

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

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

--- Comment #13 from Dlang Bot <dlang-bot@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

--
January 25, 2022
https://issues.dlang.org/show_bug.cgi?id=17635

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

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

--- Comment #14 from Dlang Bot <dlang-bot@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

--
1 2
Next ›   Last »