You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct A(int M, int N) {}
void f(int M)(A!(M - 1, M) a) {}
void main() {
A!(1, 2) a;
f(a);
}
Output from dmd:
test.d(3): Error: undefined identifier `M`
test.d(7): Error: template `f` is not callable using argument types `!()(A!(1, 2))`
test.d(3): Candidate is: `f(int M)(A!(M - 1, M) a)`
Note the first line of output. It seems like the compiler should be smart enough to understand that every instance of the identifier M is defined on that line.
The text was updated successfully, but these errors were encountered:
Here's a small sample:
Output from dmd:
Note the first line of output. It seems like the compiler should be smart enough to understand that every instance of the identifier
M
is defined on that line.The text was updated successfully, but these errors were encountered: