From 72b5b7092a3f9a009de3a99c3b09bc74dd795245 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Sat, 11 Jan 2014 01:19:49 -0500 Subject: [PATCH] prevent inbounds macro from interfering with line numbers --- base/base.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/base/base.jl b/base/base.jl index 48dfed75ad0c1..a56a14f2cf605 100644 --- a/base/base.jl +++ b/base/base.jl @@ -146,11 +146,10 @@ end esc(e::ANY) = Expr(:escape, e) macro boundscheck(yesno,blk) - quote - $(Expr(:boundscheck,yesno)) - $(esc(blk)) - $(Expr(:boundscheck,:pop)) - end + # hack: use this syntax since it avoids introducing line numbers + :($(Expr(:boundscheck,yesno)); + $(esc(blk)); + $(Expr(:boundscheck,:pop))) end macro inbounds(blk)