| |
| Posted by Salih Dincer in reply to H. S. Teoh | PermalinkReply |
|
Salih Dincer
Posted in reply to H. S. Teoh
| On Tuesday, 8 February 2022 at 18:28:21 UTC, H. S. Teoh wrote:
> On Tue, Feb 08, 2022 at 06:19:55PM +0000, Salih Dincer via Digitalmars-d wrote:
> Hope, D will go on to the next version,
the compiler will release up to v10!
Many happy returns of the (D)ay...🥳
enum Dlang99 = 4026728633831507;
union Magic
{
long data;
char[8] bits;
string toString()
In latest dmd git HEAD, you need to annotate this function with return , because it escapes a reference to this . :-)
> {
return bits;
}
}
auto magic = Magic(Dlang99<<10|'D');
magic.writefln!"..::%s::..";
T
Okay, you're right. Now worked it: https://run.dlang.io/is/ja1n6C
auto toString()
{
return cast(string)bits;
}
|