Thread overview
[Issue 20780] Function parameter UDA not accepted in nested function declarations
Apr 28, 2020
Basile-z
Apr 28, 2020
Basile-z
Apr 28, 2020
Basile-z
Apr 28, 2020
Basile-z
May 01, 2020
Dlang Bot
May 01, 2020
Basile-z
May 01, 2020
Ben
May 01, 2020
Basile-z
May 03, 2020
Dlang Bot
April 28, 2020
https://issues.dlang.org/show_bug.cgi?id=20780

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Function parameter UDA are  |Function parameter UDA not
                   |not accepted in nested      |accepted in nested function
                   |function declarations       |declarations

--
April 28, 2020
https://issues.dlang.org/show_bug.cgi?id=20780

--- Comment #1 from Basile-z <b2.temp@gmx.com> ---
Better TC:

---
void main()
{
    struct  A;
    struct  B { struct CD;}
    alias   V = void;
    alias   I = int;
    V    test0(@A I)                {}
    V    test1(@A @(B) I)           {}
    V    test2(@(B.CD) @B I)        {}
    V    test3(@A I, @B @A I)       {}
    V    test3(@A I, @(B.CD) @A I)  {}
}
---

--
April 28, 2020
https://issues.dlang.org/show_bug.cgi?id=20780

--- Comment #2 from Basile-z <b2.temp@gmx.com> ---

forgott to rename last test func

---
void main()
{
    struct  A;
    struct  B { struct CD;}
    alias   V = void;
    alias   I = int;
    V    test0(@A I)                {}
    V    test1(@A @(B) I)           {}
    V    test2(@(B.CD) @B I)        {}
    V    test3(@A I, @B @A I)       {}
    V    test4(@A I, @(B.CD) @A I)  {}
}
---

--
April 28, 2020
https://issues.dlang.org/show_bug.cgi?id=20780

--- Comment #3 from Basile-z <b2.temp@gmx.com> ---
Created attachment 1780
  --> https://issues.dlang.org/attachment.cgi?id=1780&action=edit
patch for the bug

--
May 01, 2020
https://issues.dlang.org/show_bug.cgi?id=20780

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

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

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
@benjones updated dlang/dmd pull request #11086 "fix issue 20780 PR for the patch written by Basile-Z" fixing this issue:

- fix issue 20780 PR for the patch written by Basile-Z

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

--
May 01, 2020
https://issues.dlang.org/show_bug.cgi?id=20780

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ben.james.jones@gmail.com

--- Comment #5 from Basile-z <b2.temp@gmx.com> ---
@benjones, thanks for taking the time to handle the PR. Since I cannot register on GH anymore here's a small review.

1. Check the formating of the case statement. The oginal patch was formatted
correctly apparently
(https://issues.dlang.org/attachment.cgi?id=1780&action=diff  VS
https://github.com/dlang/dmd/pull/11086/files#diff-cd066d37445cac534313c0137c2d4bbeR7274)

2. in order not to loose the authorship info, that are available with the patch, you must use:

  $ git checkout -b issue-20780
  $ git am 0001-fix-issue-20780-Function-parameter-UDA-not-accepted-.patch

instead of:

  $ git checkout -b issue-20780
  $ git apply 0001-fix-issue-20780-Function-parameter-UDA-not-accepted-.patch

--
May 01, 2020
https://issues.dlang.org/show_bug.cgi?id=20780

--- Comment #6 from Ben <ben.james.jones@gmail.com> ---
I didn't actually use the patch file before... Should be fixed now, can you double check?

--
May 01, 2020
https://issues.dlang.org/show_bug.cgi?id=20780

--- Comment #7 from Basile-z <b2.temp@gmx.com> ---
Yes thanks LGTM.

Git is very complete. It makes the difference between the author and the commiter, maybe other stuff too. If after a while it appears that the fix is not good people could blame me in person now ;)

--
May 03, 2020
https://issues.dlang.org/show_bug.cgi?id=20780

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

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

--- Comment #8 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #11086 "Fix issue 20780: Function parameter UDA not accepted in nested function declarations" was merged into master:

- c43171a7674459626e92e2c503d2c89a4491c24f by Basile Burg:
  fix issue 20780 - Function parameter UDA not accepted in nested function
declarations

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

--