[Issue 20574] New: Ambigious parameter names should trigger an error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 11 18:30:04 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20574
Issue ID: 20574
Summary: Ambigious parameter names should trigger an error
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: puremagic at zoadian.de
````
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.
--
More information about the Digitalmars-d-bugs
mailing list