aboutsummaryrefslogtreecommitdiff
path: root/Sil
diff options
context:
space:
mode:
authorCamil Staps2017-07-27 14:07:42 +0200
committerCamil Staps2017-07-27 14:07:42 +0200
commit1e128f3e3f8a2f0db8f90a9ec750e08b1b8b6ad0 (patch)
tree630efd53f958169f9e2cc60f87df00c72600ef01 /Sil
parentResolve #3: comments (diff)
Check type for initial values of locals
Diffstat (limited to 'Sil')
-rw-r--r--Sil/Compile.icl2
1 files changed, 1 insertions, 1 deletions
diff --git a/Sil/Compile.icl b/Sil/Compile.icl
index d59573d..efe61cb 100644
--- a/Sil/Compile.icl
+++ b/Sil/Compile.icl
@@ -343,7 +343,7 @@ where
s=:{bsize=0} -> tell $ repeatn s.asize 'ABC'.Create
s=:{asize=0} -> case init.init_value of
Nothing -> error $ BasicInitWithoutValue init.init_name
- Just v -> gen v *> shrinkStack s
+ Just v -> checkType init.init_type v *> gen v *> shrinkStack s
instance gen Statement
where