From 654f7e6b017c94336fd70be557a89726c41c0607 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Mon, 21 May 2012 07:56:38 -0600 Subject: [PATCH] Add unit test exposing how scope can leak into operator calls --- unittests/operator_scoping.chai | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 unittests/operator_scoping.chai diff --git a/unittests/operator_scoping.chai b/unittests/operator_scoping.chai new file mode 100644 index 00000000..e6f92726 --- /dev/null +++ b/unittests/operator_scoping.chai @@ -0,0 +1,14 @@ +def `+`(x, y) +{ + print(i); +} + +auto i = 10; + + +// It should fail because `+` should not be able to see the i + +"1" + 1; +assert_false(true); + +