[Issue 1924] Allow writefln like ouput during CTFE.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 26 06:50:56 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=1924
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |razvan.nitu1305 at gmail.com
Component|dmd |phobos
Version|D1 (retired) |D2
--- Comment #12 from RazvanN <razvan.nitu1305 at gmail.com> ---
This bug report is invalid. The original reported issue is invalid since pragma
cannot evaluate at compile time the value of a runtime variable.
As for the other proposed issue - the ability to print when a function is
evaluated - it doesn't have to be implemented in the compiler. This can be
implemented as a function in phobos.
Changing component from dmd to phobos.
Test case:
import std.stdio;
char[] wrongfunc()
{
char[] result;
writeln(result);
return result;
}
void main()
{
enum c = wrongfunc();
}
--
More information about the Digitalmars-d-bugs
mailing list