Bug 24203 – Params section in ddoc comments causes warnings with unnamed parameters

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-10-28T01:01:47Z
Last change time
2024-12-13T19:31:20Z
Keywords
ddoc, diagnostic
Assigned to
No Owner
Creator
elpenguino+D
Moved to GitHub: dmd#20345 →

Comments

Comment #0 by elpenguino+D — 2023-10-28T01:01:47Z
Compile with `-D -w`: ``` /// Params: void foo(int) {} ``` In DMD 2.105.2, this produces a warning: `Warning: Ddoc: parameter count mismatch, expected 1, got 0` Unnamed parameters should be ignored.
Comment #1 by elpenguino+D — 2023-10-28T01:03:51Z
*** Issue 24204 has been marked as a duplicate of this issue. ***
Comment #2 by nick — 2023-11-20T12:29:51Z
I think this warning is correct - why have a 'Params' section with no content?
Comment #3 by elpenguino+D — 2023-11-20T14:35:14Z
(In reply to Nick Treleaven from comment #2) > I think this warning is correct - why have a 'Params' section with no > content? There is no warning for an empty Params section. This warning is produced for ``` /// Params: /// a = b void foo(int a, int) {} ``` But it is not produced for ``` /// Params: void foo() {} ``` The example was just the simplest reproduction I could come up with.
Comment #4 by robert.schadek — 2024-12-13T19:31:20Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20345 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB