Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambigious parameter names should trigger an error #10407

Open
dlangBugzillaToGithub opened this issue Feb 11, 2020 · 1 comment
Open

Ambigious parameter names should trigger an error #10407

dlangBugzillaToGithub opened this issue Feb 11, 2020 · 1 comment

Comments

@dlangBugzillaToGithub
Copy link

puremagic (@Zoadian) reported this on 2020-02-11T18:30:04Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=20574

CC List

  • razvan.nitu1305

Description

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.
@dlangBugzillaToGithub
Copy link
Author

razvan.nitu1305 commented on 2023-04-17T16:04:58Z

This is not a compiler issue, but a phobos one.

@LightBender LightBender removed the P4 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants