Keywords: How to trick the compiler?

Namespace rswhite4 at googlemail.com
Tue Jan 28 04:25:18 PST 2014


On Tuesday, 28 January 2014 at 11:22:10 UTC, Chris wrote:
> Is there a simple way to trick the compiler (e.g. with alias), 
> if a keyword conflicts with a function/method, e.g. as in a 
> HTML document:
>
> auto docBody = document.body;
>
> // corresponding method (will not compile due to body being a 
> keyword)
>
> @property auto body() {
>   // simplified code
>   return this.getElementByTagName("body");
> }

Write in with an uppercase. ;)
Int, If, Template...


More information about the Digitalmars-d-learn mailing list