aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2024-09-05 23:29:09 +0100
committerArun Isaac2024-09-05 23:35:11 +0100
commit2dbaca2815e550e6155e4db189dba24701cd1ea1 (patch)
tree8ec1ccdfb33cbb435d708ef8d19a7858ed8fff11
parentc28c7950c4894dbb7773c4d9a5e52d56c972e5f1 (diff)
downloadravanan-2dbaca2815e550e6155e4db189dba24701cd1ea1.tar.gz
ravanan-2dbaca2815e550e6155e4db189dba24701cd1ea1.tar.lz
ravanan-2dbaca2815e550e6155e4db189dba24701cd1ea1.zip
work: Handle matching null objects to array types.
* ravanan/work/command-line-tool.scm (match-type): Handle matching null objects to array types.
-rw-r--r--ravanan/work/command-line-tool.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/ravanan/work/command-line-tool.scm b/ravanan/work/command-line-tool.scm
index ecf11b4..26d1a9e 100644
--- a/ravanan/work/command-line-tool.scm
+++ b/ravanan/work/command-line-tool.scm
@@ -86,7 +86,8 @@ example, when @var{type} is a union type."
((or 'null #()) 'null)
(_ #f)))
((array-type? type)
- (and (every (cut match-type <> (array-type-subtype type))
+ (and (vector? obj)
+ (every (cut match-type <> (array-type-subtype type))
(vector->list obj))
type))
((union-type? type)