June 13, 2012 [Issue 8234] New: symbols used in CTFE affect the function literal type | ||||
---|---|---|---|---|
| ||||
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: ------- |
June 27, 2012 [Issue 8234] symbols used in CTFE affect the function literal type | ||||
---|---|---|---|---|
| ||||
Posted in reply to timon.gehr@gmx.ch | 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: ------- |
Copyright © 1999-2021 by the D Language Foundation