Commit cf9368c6 authored by Jeff Smits's avatar Jeff Smits

Revert "Fixed bug in debug_assert"

This reverts commit 7e95206c.
parent 7e95206c
......@@ -100,14 +100,18 @@ impl<'d, 'f: 'd> MutContext<'d, 'f> {
"_apply_overlay: Interpreter bug, overlay is leaking a strategy definition"
);
for (name, value) in scope.term {
let value = value.expect(
"_apply_overlay: Interpreter bug, unintialised variable in overlay"
);
let result = self.match_term(&name, &value);
debug_assert!(
result.is_ok(),
"_apply_overlay: Interpreter bug, overlay has names that were bound underneath"
);
if let Some(value) = value {
let result = self.match_term(&name, &value);
debug_assert!(
result.is_ok(),
"_apply_overlay: Interpreter bug, overlay has names that were bound underneath"
);
} else {
unreachable!(
"_apply_overlay: Interpreter bug, who put an uninitialised variable in \
my overlay? >:("
)
}
}
}
......@@ -117,11 +121,7 @@ impl<'d, 'f: 'd> MutContext<'d, 'f> {
"apply_overlay: Interpreter bug, unexpected end of stack",
);
debug_assert!(
match scope.kind {
ScopeKind::Normal => false,
ScopeKind::Overlay => true,
ScopeKind::InvalidatedOverlay(_) => true,
},
scope.kind == ScopeKind::Overlay,
"apply_overlay: Interpreter bug, unexpected non-overlay scope"
);
self._apply_overlay(scope);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment