From 2dbaca2815e550e6155e4db189dba24701cd1ea1 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 5 Sep 2024 23:29:09 +0100 Subject: work: Handle matching null objects to array types. * ravanan/work/command-line-tool.scm (match-type): Handle matching null objects to array types. --- ravanan/work/command-line-tool.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3