Is this meant to be or a bug?
julia> const c = "hello";
julia> using Base.Test
julia> c = 1
ERROR: invalid redefinition of constant c
julia> try
c = 1
catch err
println(err)
end
ErrorException("invalid redefinition of constant c")
julia> try c = 1; catch err; typeof(err); end
ErrorException
julia> @test_throws ErrorException c = 1
ERROR: test failed: c = 1 did not throw ErrorException
in expression: c = 1
in error at error.jl:19
in default_handler at test.jl:27
The @test_throws macro does not recognize that the following expression
(redefinition of c) throws an ErrorException.