ChaiScript/unittests/eval_error.chai
Jason Turner a6e3fd5b42 Make reflection API part of stdlib
removes the reflection module completely. Reflection and the
ability to catch eval errors is too useful.
2014-08-27 12:05:03 -06:00

39 lines
323 B
ChaiScript

def deep()
{
try {
} catch {
} finally {
if (2)
{
}
}
}
def func()
{
deep();
}
def doing()
{
for (auto i = 0; i < 10; ++i)
{
func();
}
}
def while_doing()
{
while (true)
{
doing();
}
}
auto f = fun() { while_doing(); }
assert_equal(get_eval_error(f).call_stack.size(), 16)