Skip to content

Commit

Permalink
don't go into inference
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeInnes committed Mar 6, 2018
1 parent 06a3c66 commit ac0d356
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const ignored_methods = [@which((1,2)[1])]
@primitive ctx::Trace function (f::Any)(args...)
C, T = Call(f, args...), typeof.((f, args...))
(T ctx.seen || isprimitive(f) ||
method(C) ignored_methods) && return f(args...)
method(C) ignored_methods ||
method(C).module == Core.Inference) && return f(args...)
push!(ctx.seen, T)
result = overdub(ctx, f, args...)
analyse((a...) -> ctx.warn(Warning(a...)), C)
Expand Down

0 comments on commit ac0d356

Please sign in to comment.