-- main.mcl -- $x1 = "i am x1" # i am top-level $x2 = "i am x2" # i am top-level class c2() { $z = "i am y and " + $x1 $x1 = "hey" # shadow } include c2 as f1 test "${f1.z}" {} test "${f1.x1}" {} # the really tricky case # XXX: works atm, but not supported for now: could not set scope: variable f1.x2 not in scope # We currently re-export anything in the parent scope as available from our # current child scope, which makes this variable visible. Unfortunately, it does # not have the correct dependency (edge) present in the Ordering system, so it # is flaky depending on luck of the toposort. #test "${f1.x2}" {} -- OUTPUT -- Vertex: test[hey] Vertex: test[i am y and hey]