Skip to content

Commit

Permalink
make eof inferable
Browse files Browse the repository at this point in the history
  • Loading branch information
bicycle1885 committed Mar 10, 2018
1 parent 049241b commit a636a4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function Base.eof(stream::TranscodingStream)
elseif mode == :panic
throw_panic_error()
else
assert(false)
@assert false
end
end

Expand Down
1 change: 1 addition & 0 deletions test/codecnoop.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
source = IOBuffer("")
stream = TranscodingStream(Noop(), source)
@test eof(stream)
@inferred eof(stream)
@test read(stream) == UInt8[]
@test contains(repr(stream), "mode=read")

Expand Down

0 comments on commit a636a4f

Please sign in to comment.