-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
ability to obtain return type of generic function when it has no dependencies #846
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
Comments
I believe this is related to parseInt being a generic function |
Oooh ye, that might be it. Tried a few other functions like allocPrint, but ofc, that is also generic. Here is the bare bones version:
|
@andrewrk Do we mark this as fixed? The compiler doesn't crash on anymore and gives an error message instead. The real question, if my bare bones example should work or not. After all, |
I'm not sure. It's a difficult question that I'm not prepared to address yet. Let's revisit closer to 1.0.0. |
Possibly related to #2174, but I'm not sure. |
This would also allow for the proper return types to show up in the generated documentation. |
I think this is resolved in stage2: #11188 If the return type isn't dependent on generic parameters, it returns the type. |
That's correct. The only thing missing to close this issue is to add a behavior test. |
A test for this already exists in zig/test/behavior/type_info.zig Line 378 in b40fc70
|
The text was updated successfully, but these errors were encountered: