Bug 8739 – DDoc outputs wrong parameter name in delegate parameter list
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-09-29T22:58:00Z
Last change time
2013-11-24T06:27:21Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
jakobovrum
Comments
Comment #0 by jakobovrum — 2012-09-29T22:58:02Z
The following code:
----------------------------------------
void delegate(int a) dg;
/// Test - this works
void delegate(int b) dg2;
/// Test - this doesn't
void delegate(int c)[] dg3;
/// Another test - this doesn't either
void delegate(int d)* dg4;
void main() {}
----------------------------------------
Produces the following DDoc output for the symbol 'dg2':
void delegate(int b) dg2;
Test - this works
void delegate(int a)[] dg3;
Test - this doesn't
void delegate(int a)* dg4;
Another test - this doesn't either
Notice how the name of the first parameter is wrong when the delegate is part of a composite type (dg3 and dg4). It does not happen when the variable is of plain delegate type (as is the case of dg2). It seems to happen even in cases when dg is in an imported module.
I don't know if this is a regression - if it is, it's not a recent one. I tested on versions 2.060, 2.059, 2.058 and 2.057; they all exhibit the exact same problem.
Comment #1 by jakobovrum — 2012-09-29T22:59:39Z
(In reply to comment #0)
> Produces the following DDoc output for the symbol 'dg2':
Ignore this, I meant it produces the following output for the four symbols.
Comment #2 by github-bugzilla — 2012-10-27T00:55:20Z