From 734655cc7ac81d6a88fde4342731df3dc33445e1 Mon Sep 17 00:00:00 2001
From: jD91mZM2 <me@krake.one>
Date: Sat, 16 Jun 2018 08:33:41 +0200
Subject: [PATCH] Improve scope test

---
 examples/scopes.ion | 29 ++++++++++++++++++++++++-----
 examples/scopes.out |  4 ++++
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/examples/scopes.ion b/examples/scopes.ion
index dbf8a93d..4f7d6312 100644
--- a/examples/scopes.ion
+++ b/examples/scopes.ion
@@ -1,9 +1,28 @@
-let x = 5
+if test 1 == 1
+  let x = 5
+
+  if test 1 == 1
+    let x = 2
+    let y = 3
+  end
+
+  echo $x
+  echo $y
+end
 
 if test 1 == 1
-  let x = 2
-  let y = 3
+  let x = 1
+
+  fn print
+    echo $x
+    echo $y
+  end
+
+  if test 1 == 1
+    let y = 2
+    print
+  end
 end
 
-echo "$x"
-echo "$y"
+echo $x
+echo $y
diff --git a/examples/scopes.out b/examples/scopes.out
index 9a7456b5..15020d14 100644
--- a/examples/scopes.out
+++ b/examples/scopes.out
@@ -1,2 +1,6 @@
 2
 
+1
+
+
+
-- 
GitLab