diff options
-rw-r--r-- | stdlib/compiler.tl | 2 | ||||
-rw-r--r-- | stdlib/match.tl | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/stdlib/compiler.tl b/stdlib/compiler.tl index 58685741..a837571e 100644 --- a/stdlib/compiler.tl +++ b/stdlib/compiler.tl @@ -1411,6 +1411,8 @@ (set form (rlcp ^(,bin ,a ,b) form))) ((- @a) (set form (rlcp ^(neg ,a) form))) + ((subtypep (typeof @a) @b) + (set form (rlcp ^(typep ,a ,b) form))) ((@(or ignore nilf) . @args) (if (eql sym 'ignore) (each ((a args)) diff --git a/stdlib/match.tl b/stdlib/match.tl index 65382cc2..333596b2 100644 --- a/stdlib/match.tl +++ b/stdlib/match.tl @@ -163,8 +163,7 @@ (ret ^(slotp ,type-gensym ',@1)) required-slots)) - ^(subtypep (typeof ,obj-var) - ',required-type)))))) + ^(typep ,obj-var ',required-type)))))) (unless loose-p (let ((type (find-struct-type required-type))) (if type |