-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
Forward reference error #20965
Comments
It's not that simple, |
These are all good reasons, but at the end of the day, this builds if foo is instantiated by a 3rd party, so it is likely that I'm going a bit off topic here, but this is also why adding a bunch of crap in the language continuously is bound to not yield very good results. Nobody cares about |
|
I'm not saying
I agree, but other people insist on getting features added. |
There is not really a need to finish the semantic analysis of the template instance here to finish analysis of |
See dlang/dmd#20965 The fix is to use a concrete return type (for now). Might actually be clearer even, so we may want to keep it even if dmd gets fixed. It does seem unlikely though...
Sample code:
Leads to the following error:
I don't think this forward reference error is justified, considering the return type for foo is known. If
foo
is instantiated somewhere else before it is inbar
, the error goes away.The text was updated successfully, but these errors were encountered: