Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Commit

Permalink
immutable -> struct
Browse files Browse the repository at this point in the history
  • Loading branch information
cstjean committed Aug 8, 2017
1 parent a21040d commit cd721b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/TraceCalls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ end

tree_size(tr::Trace) = 1 + mapreduce(tree_size, +, 0, tr.called)
Base.copy(tr::Trace) = Trace(tr.func, tr.args, tr.kwargs, tr.called, tr.value)
immutable NotReturned end # special flag value
struct NotReturned end # special flag value
Base.push!(tr::Trace, sub_trace::Trace) = push!(tr.called, sub_trace)
Base.getindex(tr::Trace, i::Int) = tr.called[i]
Base.getindex(tr::Trace, i::Int, j::Int, args...) = tr.called[i][j, args...]
Expand Down Expand Up @@ -621,7 +621,7 @@ end

################################################################################

immutable IsEqual
struct IsEqual
a
b
end
Expand Down
8 changes: 4 additions & 4 deletions src/code_update.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ end

################################################################################

immutable CodeUpdate
struct CodeUpdate
md::ModDict
end
CodeUpdate() = CodeUpdate(ModDict())
Expand Down Expand Up @@ -81,7 +81,7 @@ Base.filter(fn::Function, cu::CodeUpdate) =
to modify a module, and revert it back to its former state. Use `apply_code!` and
`revert_code!`, or `(::RevertibleCodeUpdate)() do ... end` to temporarily apply the code.
"""
immutable RevertibleCodeUpdate
struct RevertibleCodeUpdate
apply::CodeUpdate
revert::CodeUpdate
end
Expand Down Expand Up @@ -191,13 +191,13 @@ method_file_counts(fn_to_change) =
for (mod, file, line) in Set((m.module, functionloc(m)...)
for m in methods(fn_to_change).ms))

immutable UpdateInteractiveFailure
struct UpdateInteractiveFailure
fn::Union{Function, Type}
end
Base.show(io::IO, upd::UpdateInteractiveFailure) =
write(io, "Cannot find source of some method of $(upd.fn). Perhaps it was defined interactively? Try adding `@traceable` in front of its definition.")

immutable MissingMethodFailure
struct MissingMethodFailure
count::Int
correct_count::Int
fn::Union{Function, Type}
Expand Down

0 comments on commit cd721b5

Please sign in to comment.