From 3532c7174f9a167740154018b1d95e8c86af6079 Mon Sep 17 00:00:00 2001 From: Mike J Innes Date: Mon, 22 May 2017 17:32:10 +0100 Subject: [PATCH] early throw on cyclic graphs --- src/compiler/interp.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/interp.jl b/src/compiler/interp.jl index f3fe4a21..2e307006 100644 --- a/src/compiler/interp.jl +++ b/src/compiler/interp.jl @@ -15,6 +15,7 @@ end function interp(ctx, f, xs...) g = graph(f) + g ≠ nothing && iscyclic(g) && error("Can't interpret cyclic graph") @icatch(ctx, g ≠ nothing ? interpret(ctx, reifyparams(g), xs...) : f(xs...))