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
auto a(int b = a) {}
auto a(int b) {}
The error when compiling the above is:
---
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
a.d(1): Error: forward reference to template a
---
Which is about 18 errors too many.
Reverse the declarations, and the error becomes a little more reasonable:
---
a.d(2): Error: forward reference to template a
a.d(2): Error: forward reference to template a
a.d(2): Error: none of the overloads of a are callable using argument types (), candidates are:
a.d(1): a.a(int b)
a.d(2): a.a(int b = a)
---
The text was updated successfully, but these errors were encountered:
Iain Buclaw (@ibuclaw) reported this on 2019-06-16T09:46:10Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=19973
CC List
Description
auto a(int b = a) {} auto a(int b) {} The error when compiling the above is: --- a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a a.d(1): Error: forward reference to template a --- Which is about 18 errors too many. Reverse the declarations, and the error becomes a little more reasonable: --- a.d(2): Error: forward reference to template a a.d(2): Error: forward reference to template a a.d(2): Error: none of the overloads of a are callable using argument types (), candidates are: a.d(1): a.a(int b) a.d(2): a.a(int b = a) ---The text was updated successfully, but these errors were encountered: