-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
fix fallback code path in take!(::IOBuffer)
method
#58762
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
Conversation
You are right - this branch is unreachable, but it has nothing to do with |
Thanks for explaining, @jakobnissen. |
I think your error message is fine. One would have to use a private, undocumented constructor to hit it, and then all kinds of things can go wrong |
JET told me that the `data` local variable was inparticular is undefined at this point. After reviewing this code, I think this code path is unreachable actually since `bytesavailable(io::IOBuffer)` returns `0` when `io` has been closed. So it's probably better to make it clear.
e90797f
to
5535a13
Compare
JET told me that the `data` local variable was inparticular is undefined at this point. After reviewing this code, I think this code path is unreachable actually since `bytesavailable(io::IOBuffer)` returns `0` when `io` has been closed. So it's probably better to make it clear.
JET's new analysis pass now detects local variables that may be undefined, which has revealed such issues in several functions within Base (#58762). This commit addresses local variables whose definedness the compiler cannot properly determine, primarily in functions reachable from JET's test suite. No functional changes are made.
JET's new analysis pass now detects local variables that may be undefined, which has revealed such issues in several functions within Base (#58762). This commit addresses local variables whose definedness the compiler cannot properly determine, primarily in functions reachable from JET's test suite. No functional changes are made.
JET's new analysis pass now detects local variables that may be undefined, which has revealed such issues in several functions within Base (#58762). This commit addresses local variables whose definedness the compiler cannot properly determine, primarily in functions reachable from JET's test suite. No functional changes are made.
JET's new analysis pass now detects local variables that may be undefined, which has revealed such issues in several functions within Base (#58762). This commit addresses local variables whose definedness the compiler cannot properly determine, primarily in functions reachable from JET's test suite. No functional changes are made.
JET's new analysis pass now detects local variables that may be undefined, which has revealed such issues in several functions within Base (#58762). This commit addresses local variables whose definedness the compiler cannot properly determine, primarily in functions reachable from JET's test suite. No functional changes are made.
JET told me that the
data
local variable was inparticular is undefined at this point.After reviewing this code, I think this code path is unreachable actually since
bytesavailable(io::IOBuffer)
returns0
whenio
has been closed. So it's probably better to make it clear.