Jump to page: 1 2
Thread overview
[Issue 18439] Error: cannot use operator ~= in @nogc delegate 'main.test.__lambda1'
Feb 15, 2018
Timothee Cour
Feb 15, 2018
Seb
Jun 21, 2018
David Bennett
Jun 27, 2018
Seb
May 30, 2019
Dlang Bot
May 31, 2019
Dlang Bot
Jun 06, 2019
Dlang Bot
Jan 16, 2020
timon.gehr@gmx.ch
Feb 07, 2020
Walter Bright
Mar 01, 2020
Dlang Bot
Dec 17, 2022
Iain Buclaw
February 15, 2018
https://issues.dlang.org/show_bug.cgi?id=18439

Timothee Cour <timothee.cour2@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2@gmail.com

--- Comment #1 from Timothee Cour <timothee.cour2@gmail.com> ---
marked as critical because it prevents top-level `@nogc:` in a module in many cases

--
February 15, 2018
https://issues.dlang.org/show_bug.cgi?id=18439

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com

--- Comment #2 from Seb <greensunny12@gmail.com> ---
Reduced it further:

---
@nogc:
void main(){
  static foreach (i; 0 .. 2){}
}
---

--
June 21, 2018
https://issues.dlang.org/show_bug.cgi?id=18439

David Bennett <davidbennett@bravevision.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davidbennett@bravevision.co
                   |                            |m

--- Comment #3 from David Bennett <davidbennett@bravevision.com> ---
Just ran into this myself and was going to file an issue but you beat me to it.

--
June 27, 2018
https://issues.dlang.org/show_bug.cgi?id=18439

--- Comment #4 from Seb <greensunny12@gmail.com> ---
I looked a bit at this and there seem to be two issues going on:

1) DMD creates the __lambda1 member
For this in @nogc main case (i.e. without label), TypeFunction.isnogc = false
-> initInferAttributes tries to infer the attributes of the lambdas and infers
it to be not @nogc
For this @nogc: main case (i.e. with the label), TypeFunction.isnogc = true
-> setGC returns true -> failure on CatAssign

2) The __lambda1 uses a CatAssign (probably from CTFE?) and that's checked even
though it never makes it to the codegen.

--
February 05, 2019
https://issues.dlang.org/show_bug.cgi?id=18439

andy.pj.hanson@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andy.pj.hanson@gmail.com

--
May 30, 2019
https://issues.dlang.org/show_bug.cgi?id=18439

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

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

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
@look-at-me created dlang/dmd pull request #9922 "Fix Issue 18439 Fix issue with `static foreach` not working with scoped @nogc." fixing this issue:

- Fix Issue 18439 Fix issue with `static foreach` not working with scoped @nogc.

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

--
May 31, 2019
https://issues.dlang.org/show_bug.cgi?id=18439

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

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

--- Comment #6 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #9922 "Fix Issue 18439 Fix issue with `static foreach` not working with scoped @nogc." was merged into stable:

- 0a65ef981578e263a380f6df4668572dce0a52d6 by look-at-me:
  Fix Issue 18439 Fix issue with `static foreach` not working with scoped
@nogc.

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

--
June 06, 2019
https://issues.dlang.org/show_bug.cgi?id=18439

--- Comment #7 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #9984 "Revert "Fix Issue 18439 Fix issue with `static foreach` not working with scoped @nogc."" was merged into stable:

- 76d0babcb454e39bfd420cf5f26faf38ac8b2297 by look-at-me:
  Revert "Fix Issue 18439 Fix issue with `static foreach` not working with
scoped @nogc."

  This reverts commit 0a65ef981578e263a380f6df4668572dce0a52d6.

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

--
January 16, 2020
https://issues.dlang.org/show_bug.cgi?id=18439

timon.gehr@gmx.ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |timon.gehr@gmx.ch
         Resolution|FIXED                       |---

--- Comment #8 from timon.gehr@gmx.ch ---
Reopening, as the "fix" has been reverted.

--
February 07, 2020
https://issues.dlang.org/show_bug.cgi?id=18439

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #9 from Walter Bright <bugzilla@digitalmars.com> ---
For functions, the line is:

  sc2.stc &= ~(STC.auto_ | STC.scope_ | STC.static_ | STC.extern_ |
STC.abstract_ | STC.deprecated_ | STC.override_ |
               STC.TYPECTOR | STC.final_ | STC.tls | STC.gshared | STC.ref_ |
STC.return_ | STC.property |
               STC.nothrow_ | STC.pure_ | STC.safe | STC.trusted | STC.system);

   https://github.com/dlang/dmd/blob/master/src/dmd/semantic3.d#L316

Interestingly, @nogc does flow through here.

--
« First   ‹ Prev
1 2