digitalmars.D.bugs - [Issue 8234] New: symbols used in CTFE affect the function literal type
- d-bugmail puremagic.com (22/22) Jun 13 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8234
- d-bugmail puremagic.com (20/20) Jun 26 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8234
http://d.puremagic.com/issues/show_bug.cgi?id=8234 Summary: symbols used in CTFE affect the function literal type Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch --- Comment #0 from timon.gehr gmx.ch 2012-06-13 07:33:14 PDT --- DMD 2.059: void foo(){ immutable int x = 0; static assert(is(typeof(*(){enum e=x;return e;})==function)); // fail } The static assertion should pass. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 13 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8234 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clugdbug yahoo.com.au --- Comment #1 from Don <clugdbug yahoo.com.au> 2012-06-26 23:48:13 PDT --- This is not a CTFE bug. void foo() { immutable int x = 0; auto k = *(){enum e=x;return e;}; } bug.d(4): Error: can only * a pointer, not a 'immutable(int) delegate() pure nothrow safe' Closure inference for 'is this a delegate literal' vs 'is this a function literal' incorrectly checks enum initializers. Similar to bug 6169. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 26 2012