mirror of
https://github.com/samsonjs/lake.git
synced 2026-03-25 08:55:49 +00:00
make type_name more robust
This commit is contained in:
parent
7dbea04337
commit
b54d457971
1 changed files with 2 additions and 1 deletions
|
|
@ -87,7 +87,8 @@ static char *type_name(LakeVal *expr)
|
|||
"dotted-list", "primitive", "function"
|
||||
};
|
||||
|
||||
return type_names[expr->type];
|
||||
LakeType t = expr->type;
|
||||
return t >= 0 && t <= 8 ? type_names[t] : "(not a LakeVal)";
|
||||
}
|
||||
|
||||
gboolean lake_equal(LakeVal *a, LakeVal *b)
|
||||
|
|
|
|||
Loading…
Reference in a new issue