[Issue 11170] New: nested function cannot be accessed from
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 3 22:25:41 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11170
Summary: nested function cannot be accessed from
Product: D
Version: D2
Platform: x86_64
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: pycerl at qq.com
--- Comment #0 from Zhouxuan <pycerl at qq.com> 2013-10-03 22:25:40 PDT ---
mixin template test()
{
int next;
}
void foo(alias l)()
{
l.next = 0;
}
void bar(alias l, alias t)()
{
l.next = 0;
}
void main()
{
struct A
{
int next;
}
A a;
mixin test l1;
mixin test l2;
foo!(a);//Okay
foo!(l1);//Error
bar!(l1,a);//Okay
bar!(l1,l2);//Error
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list