Thread overview
[Issue 9578] New: "is a nested function and cannot be accessed from" problem
Feb 23, 2013
Denis Shelomovskij
Feb 27, 2013
Denis Shelomovskij
Jul 10, 2013
Walter Bright
February 23, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9578

           Summary: "is a nested function and cannot be accessed from"
                    problem
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: verylonglogin.reg@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-02-23 20:51:20 MSK ---
The following code compiles fine if `t.tf` is not templated:
---
template t(alias f)
{
    void tf()() { f(); }
}

void g(alias f)()
{
    f(); // Error: function main.h.t!(m).tf!().tf is a nested function and
cannot be accessed from main.g!(tf).g
}

void h()
{
    int i = 0;
    int m() { return i; }
    g!(t!m.tf)();
}
---

As a result `std.functional.not` and `std.algorithm.all` (as it uses `not`) don't work for nested predicates.

Also see Issue 8693.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 27, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9578



--- Comment #1 from Denis Shelomovskij <verylonglogin.reg@gmail.com> 2013-02-27 17:01:42 MSK ---
Issue workaround to `std.algorithm.all`: https://github.com/D-Programming-Language/phobos/pull/1178

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 07, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9578



--- Comment #2 from github-bugzilla@puremagic.com 2013-03-06 22:15:42 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/b5ca2ef0c9742c89a587d476848e0f34df2a4f9e Add Issue 9578 workaround to `std.algorithm.all`

As a result `all` can now be used with nested predicates.

Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=9578

https://github.com/D-Programming-Language/phobos/commit/8dbfc1a7382792e039c8f1d7f5f5232279dead04
Merge pull request #1178 from
denis-sh/add-Issue-9578-workaround-to-`std.algorithm.all`

Add Issue 9578 workaround to `std.algorithm.all`

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9578



--- Comment #3 from github-bugzilla@puremagic.com 2013-07-09 23:36:31 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/98a398b704001b0bb1fd0259e5687dab11e88cce fix Issue 9578 - "is a nested function and cannot be accessed from" problem

https://github.com/D-Programming-Language/dmd/commit/e66cc8f5787154bc0225246e2c49c84842727d05 Merge pull request #2330 from 9rnsr/fix9578

Issue 9578 - "is a nested function and cannot be accessed from" problem

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 10, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9578


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 13, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9578



--- Comment #4 from github-bugzilla@puremagic.com 2013-07-13 08:57:46 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/05538fe8fc62333b59a06fd0c03c5b9d4a6b47ae Remove bug 9578 workaround

Because the compiler bug was fixed recently.

---
Revert "Merge pull request #1178 from denis-sh/add-Issue-9578-workaround-to-`std.algorithm.all`"

This reverts commit 8dbfc1a7382792e039c8f1d7f5f5232279dead04, reversing changes made to 93c724f2a36a798985dc1d82b050899455c8de4c.

https://github.com/D-Programming-Language/phobos/commit/0478579e89e6e2ee8b0f7b2027c3464177867fd0 Merge pull request #1406 from 9rnsr/remove9578wa

Remove bug 9578 workaround

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------