Skip to content

Wrong location for undefined identifier error in template argument #21168

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

Closed
VPanteleev-S7 opened this issue Apr 7, 2025 · 0 comments
Closed

Comments

@VPanteleev-S7
Copy link

enum plusOne(int x) = x + 1;

alias fooPlusOne =
	plusOne
	!
	foo;

Output:

test.d(4): Error: undefined identifier `foo`

The error is reported on line 4 (plusOne), but the undefined identifier in question is actually on line 6.

@VPanteleev-S7 VPanteleev-S7 changed the title Wrong location of undefined identifier in template argument Wrong location of undefined identifier error in template argument Apr 7, 2025
@VPanteleev-S7 VPanteleev-S7 changed the title Wrong location of undefined identifier error in template argument Wrong location for undefined identifier error in template argument Apr 7, 2025
@dkorpel dkorpel closed this as completed Apr 14, 2025
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