File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1119,6 +1119,10 @@ macro interpret(arg)
1119
1119
if frame === nothing
1120
1120
return eval (Expr (:call , map (QuoteNode, theargs)... ))
1121
1121
end
1122
+ if shouldbreak (frame, 1 )
1123
+ push! (stack, frame)
1124
+ return stack, BreakpointRef (frame. code, 1 )
1125
+ end
1122
1126
finish_and_return! (stack, frame)
1123
1127
end
1124
1128
end
Original file line number Diff line number Diff line change 74
74
@test isa (bp, Breakpoints. BreakpointRef)
75
75
@test JuliaInterpreter. finish_stack! (stack) == 2
76
76
77
+ # Direct return
78
+ @breakpoint gcd (1 ,1 ) a== 5
79
+ @test @interpret (gcd (10 ,20 )) == 10
80
+ # FIXME : even though they pass, these tests break Test!
81
+ # stack, bp = @interpret gcd(5, 20)
82
+ # @test length(stack) == 1 && isa(stack[1], JuliaStackFrame)
83
+ # @test isa(bp, Breakpoints.BreakpointRef)
84
+ remove ()
85
+
77
86
# break on error
78
87
inner (x) = error (" oops" )
79
88
outer () = inner (1 )
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ module Toplevel end
195
195
@test @interpret (Toplevel. paramtype (Vector)) == Toplevel. NoParam
196
196
@test @interpret (Toplevel. Inner. g ()) == 5
197
197
@test @interpret (Toplevel. Inner. InnerInner. g ()) == 6
198
+ # FIXME : even though they pass, these tests break Test!
198
199
# @test @interpret(isdefined(Toplevel, :Beat))
199
200
# @test @interpret(Toplevel.Beat <: Toplevel.DatesMod.Period)
200
201
You can’t perform that action at this time.
0 commit comments