Missing code from DMD's 2.003 front-end? (ping Walter)

James Dennett jdennett at acm.org
Tue Jul 31 10:28:46 PDT 2007


Ary Manzana wrote:
> Walter Bright wrote:
>> Ary Manzana wrote:
>>> Hi,
>>>
>>> While porting DMD's 2.003 source code to Java I realized that in
>>> parse.c a new method "parseType" with several overloads was added.
>>> However, the only definition of it is the following:
>>>
>>> Type *Parser::parseType(Identifier **pident, TemplateParameters **tpl);
>>
>> That's incorrect. In parse.h, the correct definition gives =NULL as
>> the default value for each parameter.
> 
> Thanks! I didn't know you could assign default parameters in the
> declaration and not repeat them in the definition.

Indeed, repeating them would be an error in C++ (though a later
declaration can add additional default argument values).

-- James



More information about the Digitalmars-d mailing list