Some issues (bugs?) with generated header files

evilrat evilrat666 at gmail.com
Sat Apr 5 03:55:18 PDT 2014


On Saturday, 5 April 2014 at 10:00:13 UTC, Andre wrote:
>
> 2) property methods doesn't work with header files.
> For this coding:
> 	@property docHostUIHandler()
> 	{
> 		return this._docHostUIHandler;
> 	}
> This di coding was created:
> 	@property docHostUIHandler();
>


the problem with this that your code doesnt specify neither auto 
nor other return type.

// not recommended, actual type unknown to users
@property auto docHostUIHandler()
{
  return this._docHostUIHandler;
}

// recommended, manual type
@property HostUIHandlerType()
{
  return this._docHostUIHandler;
}

p.s. language reference recommends also put underscore at end 
instead front, prepending underscore may be used by compiler 
generated stuff resulting in name clashes.


More information about the Digitalmars-d-learn mailing list