Keywords: How to trick the compiler?

Chris wendlec at tcd.ie
Tue Jan 28 03:22:09 PST 2014


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");
}


More information about the Digitalmars-d-learn mailing list