[Issue 11533] New: Compiler should allow to being nested for static local template functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 17 00:21:00 PST 2013
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 at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at 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: -------
More information about the Digitalmars-d-bugs
mailing list