[Issue 7955] Nested function error in sort with lambda template but not with a lambda
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 3 03:14:59 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7955
Denis <verylonglogin.reg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |verylonglogin.reg at gmail.com
--- Comment #1 from Denis <verylonglogin.reg at gmail.com> 2012-05-03 14:16:10 MSD ---
Reduced testcase:
---
void f(alias fun)() { }
void g(T)() {
f!(a => a)();
}
void main() {
g!int();
g!long();
}
---
Error: function main.g!(int).g.f!(__lambda2).f is a nested function and cannot
be accessed from main.g!(long).g
Workaround: explicitly define lambda type: `(int a) => a`.
--
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