Bug 20574 – Ambigious parameter names should trigger an error

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-02-11T18:30:04Z
Last change time
2024-12-01T16:36:21Z
Assigned to
No Owner
Creator
Felix Hufnagel
Moved to GitHub: phobos#10407 →

Comments

Comment #0 by puremagic — 2020-02-11T18:30:04Z
```` 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 by razvan.nitu1305 — 2023-04-17T16:04:58Z
This is not a compiler issue, but a phobos one.
Comment #2 by robert.schadek — 2024-12-01T16:36:21Z
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