www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9578] New: "is a nested function and cannot be accessed from" problem

reply d-bugmail puremagic.com writes:
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



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: -------
Feb 23 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9578




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: -------
Feb 27 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9578




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

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: -------
Mar 06 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9578




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


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: -------
Jul 09 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
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: -------
Jul 09 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9578




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.

---

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


Remove bug 9578 workaround

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