[Issue 1825] New: local instantiation and function nesting
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 9 03:08:10 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1825
Summary: local instantiation and function nesting
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: bugzilla at digitalmars.com
The following should compile, as fun1 can be instantiated within fun2.
import std.stdio;
void fun1(alias pred1, alias pred2)()
{
pred1(1);
pred2(2);
}
void fun2(alias pred1)()
{
void local(int x) { writeln("fun2.local: ", x); }
fun1!(pred1, local)();
}
void main()
{
void local(int x) { writeln("main.local: ", x); }
fun2!(local)();
}
--
More information about the Digitalmars-d-bugs
mailing list