Issue 20574 - Ambigious parameter names should trigger an error
Summary: Ambigious parameter names should trigger an error
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-11 18:30 UTC by Felix Hufnagel
Modified: 2024-12-01 16:36 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Felix Hufnagel 2020-02-11 18:30:04 UTC
````
import std.stdio;
import std.traits;

void foo(int b);
void foo(int a);

void foo(int a) {
    writeln(a);
}

pragma(msg, ParameterIdentifierTuple!foo); // prints "b"

void main() {
 	foo(5);
}
```

Ambigious parameter names should trigger an error, as per spec they _are_ part of the public API.
Also if you imagine foo beeing declared in two seperate modules i suspect import oder would change the behaviour of ParameterIdentifierTuple.
If D gets named parameters this will probably also matter.
Comment 1 RazvanN 2023-04-17 16:04:58 UTC
This is not a compiler issue, but a phobos one.
Comment 2 dlangBugzillaToGithub 2024-12-01 16:36:21 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10407

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB