digitalmars.D - Missing code from DMD's 2.003 front-end? (ping Walter)
- Ary Manzana (13/13) Jul 30 2007 Hi,
- Walter Bright (3/10) Jul 30 2007 That's incorrect. In parse.h, the correct definition gives =NULL as the
- Ary Manzana (3/14) Jul 31 2007 Thanks! I didn't know you could assign default parameters in the
- James Dennett (4/19) Jul 31 2007 Indeed, repeating them would be an error in C++ (though a later
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); However, in the source code there are several invocations like this: - parseType(&ai) - parseType() This definitely doesn't compile, unless there is some "implicit argument" feature in C++ I don't know. This is blocking my current effort to bring D2 functionality into Descent. Regards, Ary
Jul 30 2007
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.
Jul 30 2007
Walter Bright wrote:Ary Manzana wrote:Thanks! I didn't know you could assign default parameters in the declaration and not repeat them in the definition.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.
Jul 31 2007
Ary Manzana wrote:Walter Bright wrote:Indeed, repeating them would be an error in C++ (though a later declaration can add additional default argument values). -- JamesAry Manzana wrote:Thanks! I didn't know you could assign default parameters in the declaration and not repeat them in the definition.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.
Jul 31 2007