HCoop
/
jackhill
/
mal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
d: Fix crash on literal empty list
[jackhill/mal.git]
/
d
/
step5_tco.d
diff --git
a/d/step5_tco.d
b/d/step5_tco.d
index
8cef6fa
..
cc39594
100644
(file)
--- a/
d/step5_tco.d
+++ b/
d/step5_tco.d
@@
-63,6
+63,10
@@
MalType EVAL(MalType ast, Env env)
}
auto aste = ast_list.elements;
+ if (aste.length == 0)
+ {
+ return ast;
+ }
auto a0_sym = cast(MalSymbol) aste[0];
auto sym_name = a0_sym is null ? "" : a0_sym.name;
switch (sym_name)