diff --git a/tests/calls.pbc b/tests/calls.pbc new file mode 100644 index 0000000..7c59519 Binary files /dev/null and b/tests/calls.pbc differ diff --git a/tests/closures.pbc b/tests/closures.pbc new file mode 100644 index 0000000..e9b004c Binary files /dev/null and b/tests/closures.pbc differ diff --git a/tests/dispatch.pbc b/tests/dispatch.pbc new file mode 100644 index 0000000..0a2c193 Binary files /dev/null and b/tests/dispatch.pbc differ diff --git a/tests/generics.pbc b/tests/generics.pbc new file mode 100644 index 0000000..d045ca7 Binary files /dev/null and b/tests/generics.pbc differ diff --git a/tests/scopes.pbc b/tests/scopes.pbc new file mode 100644 index 0000000..0d67985 Binary files /dev/null and b/tests/scopes.pbc differ diff --git a/tests/scopes.pn b/tests/scopes.pn new file mode 100644 index 0000000..af3a92b --- /dev/null +++ b/tests/scopes.pn @@ -0,0 +1,10 @@ +var x = 5; +{ + var x = 55; + { + var x = 22; + x; + } + x; +} +x; diff --git a/tests/test.pbc b/tests/test.pbc new file mode 100644 index 0000000..0265c93 Binary files /dev/null and b/tests/test.pbc differ diff --git a/tests/test.pn b/tests/test.pn new file mode 100644 index 0000000..4405153 --- /dev/null +++ b/tests/test.pn @@ -0,0 +1,19 @@ +operator `+`(a, b: int): int { + #pragma[magic: "AddInt64", pure] +} + + +fn getAdder(a, b: int): fn: int64 { + var x = a; + var y = b; + fn adder: int { + return x + y; + } + return adder; +} + + +var a = 5; +var b = 6; +var adder = getAdder(a, b); +adder();