DMD as a library package can now run through all semantic phases

timotheecour timothee.cour2 at gmail.com
Sat Jan 27 01:25:18 UTC 2018


On Friday, 26 January 2018 at 18:40:23 UTC, Seb wrote:
> Want to know what it prints? Run the file!
> Spoiler: it's similar to new the AST feature at run.dlang.io:


prettyPrint produces valid D code except for template 
instantiations:
```
writeln!int
  {
      @safe void writeln(int _param_0)
      {
          import std.traits : isAggregateType;
          ((File __tmpfordtor37 = trustedStdout();) , 
__tmpfordtor37).write(_param_0, '\x0a');
      }

  }
```

why not write something like:
```
template writeln(T:int)
{
...
}
```
or template writeln(T) if(is(T==int))


More information about the Digitalmars-d mailing list