Commit befbc71d authored by Jeff Smits's avatar Jeff Smits

Backtracking+closures test input

parent bf2e5c1b
\ No newline at end of file
module backtrack
imports libstratego-lib
// EXPECTED BEHAVIOUR: program fails at runtime because of unbound b
// f always fails, but it binds b before that. In a guarded choice, the binding to b needs to be undone. But if you
// compile this program with -O 0 (no optimisations), f stays a separate strategy and becomes a closure inside the
// execution environment. Interaction between closures and backtracking can be trick, hence this "test".
main = {b: let f = ?b; fail in f <+ !b end }
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