From 4f237fbe5d9637141a4d060a579fd123c05cbe49 Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Fri, 10 Jan 2025 11:34:33 +0000 Subject: [PATCH] add test for lexical scoping --- test/run-drun/migration-scoping.mo | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/run-drun/migration-scoping.mo diff --git a/test/run-drun/migration-scoping.mo b/test/run-drun/migration-scoping.mo new file mode 100644 index 00000000000..30fb4e126ff --- /dev/null +++ b/test/run-drun/migration-scoping.mo @@ -0,0 +1,14 @@ +import Prim "mo:prim"; +// compilation only test (correct lexical scoping) +// migration expression can access pattern variables +// migration expression doesn't capture class parameters +shared(v) actor [func ({}) : {} { Prim.debugPrint (debug_show v); {} }] class + C(v : Bool) = { + assert v +}; + +//SKIP run +//SKIP run-ir +//SKIP run-low +//SKIP ic-ref-run +//SKIP drun-run