www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11533] New: Compiler should allow to being nested for static local template functions

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11533

           Summary: Compiler should allow to being nested for static local
                    template functions
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2013-11-17 00:20:56 PST ---
Test case:

struct S
{
    void put(alias fun)() { fun!int(); }
}
void main()
{
    static void foo(T)() {}
    S s;
    s.put!foo();

    static void bar(alias fun)() { fun(); }
    void nested() {}
    bar!nested();
}

In main, foo and bar are static template function.
- When foo is instantiated in S.put, foo!int should not capture the frame of
main function.
- When bar is instantiated in main, it should capture the frame of main
function for the alias template parameter `fun`, but bar itself should not
capture any frame.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 17 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11533


Kenji Hara <k.hara.pg gmail.com> changed:

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


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-11-17 05:18:26 PST ---
https://github.com/D-Programming-Language/dmd/pull/2794

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 17 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11533



--- Comment #2 from github-bugzilla puremagic.com 2013-11-18 17:49:21 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/cfc81c56cd551bb366d978e9d016112ad8a6b6ea
fix Issue 11533 - Compiler should allow to being nested for static local
template functions

https://github.com/D-Programming-Language/dmd/commit/07d776adfc8ded02da55805530c5f6dd454aee89
Merge pull request #2794 from 9rnsr/fix11533

Issue 11533 - Compiler should allow to being nested for static local template
functions

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 18 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11533


Kenji Hara <k.hara.pg gmail.com> changed:

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


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 18 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11533


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow gmail.com


--- Comment #3 from Kenji Hara <k.hara.pg gmail.com> 2013-11-22 00:19:46 PST ---
*** Issue 7805 has been marked as a duplicate of this issue. ***

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