-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Return value ignored #3821
Comments
So, here's something fun:
|
With @vtjnash 's help I found out that the culprit is the comprehension on the ports array. |
@JeffBezanson the following 3 line patch fixes the issue, and demonstrates some really cool possibilities in type inference:
Keno wondered whether it should be returning the Union instead of the typejoin? |
Adding methods to typejoin is entirely incorrect; the type system defines
|
Is it strictly required that the result of typejoin must be a subtype of the original types? Where else does this information get computed? Isn't typejoin supposed to be the implementation of the type system? |
This needs to be consistent with everything else in the type system, so no you can't just do whatever you'd like to here. |
In fact we didn't have typejoin for a while and it is not used that much in
|
@JeffBezanson here's a limited example demonstrating the issue:
|
Working on this now. Turns out the solution of adding As it is now (with no change), when the variable we're interested in is actually inferred to have type |
That was my analysis too. That's why I added the code above so you could decide how to fix it. Any chance we can merge #3796 (while deleting the temporary |
Consider the following method in my Docker package:
The problem is that the return value of this function is being ignored
I tried cutting it down further (the
println
isn't necessary but otherwise you don't know thatresp
is actually being assigned), but it seems that anything that makes the actual request fail makes the return work.EDIT: the
:(nothing)
is printed by my REPL, but the same thing happens with the default REPL.The text was updated successfully, but these errors were encountered: