digitalmars.D.bugs - [Issue 12237] New: Inconsistent behavior of the instantiating enclosing template function
- d-bugmail puremagic.com (43/43) Feb 23 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12237
- d-bugmail puremagic.com (10/10) Mar 09 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12237
https://d.puremagic.com/issues/show_bug.cgi?id=12237 Summary: Inconsistent behavior of the instantiating enclosing template function Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: k.hara.pg gmail.com In the case, func is a template function, and (a) { ... } is a template lambda (== template function). So the both should work as same. auto func(T)(T) { static if (is(T == int)) return func(""); else return 10; } void main() { assert(func(1) == 10); assert((a) { static if (is(typeof(a) == int)) { int x; return __traits(parent, x)(""); // line 17 } else return 10; } (1) == 10); } --- test.d(17)Error: function literal __lambda1 (int a) is not callable using argument types (string) -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 23 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12237 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull https://github.com/D-Programming-Language/dmd/pull/3370 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 09 2014