From a636a4f59d1d82c6946f014eac2cb0aecece0ec9 Mon Sep 17 00:00:00 2001 From: Kenta Sato Date: Sat, 10 Mar 2018 20:51:52 +0900 Subject: [PATCH] make eof inferable --- src/stream.jl | 2 +- test/codecnoop.jl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stream.jl b/src/stream.jl index c7a3d069..6b7cc0f2 100644 --- a/src/stream.jl +++ b/src/stream.jl @@ -183,7 +183,7 @@ function Base.eof(stream::TranscodingStream) elseif mode == :panic throw_panic_error() else - assert(false) + @assert false end end diff --git a/test/codecnoop.jl b/test/codecnoop.jl index a421e891..105466ab 100644 --- a/test/codecnoop.jl +++ b/test/codecnoop.jl @@ -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")