Thread overview | |||||
---|---|---|---|---|---|
|
March 04, 2011 [Issue 5695] New: Problem with TypeTuple of lambdas | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=5695 Summary: Problem with TypeTuple of lambdas Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-03-04 05:11:10 PST --- I don't understand what's happening here, but there is a problem somewhere (maybe in this code), D2 code: import std.stdio, std.typetuple; alias TypeTuple!((double x){ return x + x; }, (double x){ return x * x; }) funcs1; double foo1(double x) { return x + x; } double foo2(double x) { return x * x; } alias TypeTuple!(foo1, foo2) funcs2; void main() { enum double x = 5.0; foreach (f; funcs1) writeln(f(x)); foreach (f; funcs2) writeln(f(x)); } It prints (DMD 2.052): 5.28268e-308 0 10 25 Instead of: 10 25 10 25 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 26, 2012 [Issue 5695] Problem with TypeTuple of lambdas | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5695 --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-01-26 05:05:10 PST --- With 2.058head (f8887855), that code works correctly. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
January 26, 2012 [Issue 5695] Problem with TypeTuple of lambdas | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5695 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation