Skip to content

Commit

Permalink
add test for lexical scoping
Browse files Browse the repository at this point in the history
  • Loading branch information
crusso committed Jan 10, 2025
1 parent 007e9a5 commit 4f237fb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/run-drun/migration-scoping.mo
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4f237fb

Please sign in to comment.