From c32d7c5c97c2e2a7d8558e7a6593b37def18385f Mon Sep 17 00:00:00 2001
From: Jeremy Hughes <jedahu@gmail.com>
Date: Sun, 5 Jul 2009 21:03:36 +1200
Subject: [PATCH] Fixed bug where primitive-type? could not handle "Class*"
 types

---
 basis/alien/inline/types/types.factor | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/basis/alien/inline/types/types.factor b/basis/alien/inline/types/types.factor
index 6610630329..4eaade0875 100644
--- a/basis/alien/inline/types/types.factor
+++ b/basis/alien/inline/types/types.factor
@@ -1,7 +1,7 @@
 ! Copyright (C) 2009 Jeremy Hughes.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: alien.c-types assocs combinators.short-circuit fry
-kernel memoize sequences splitting ;
+USING: alien.c-types assocs combinators.short-circuit
+continuations fry kernel memoize sequences splitting ;
 IN: alien.inline.types
 
 : factorize-type ( str -- str' )
@@ -19,8 +19,10 @@ MEMO: resolved-primitives ( -- seq )
     primitive-types [ resolve-typedef ] map ;
 
 : primitive-type? ( type -- ? )
-    factorize-type resolve-typedef [ resolved-primitives ] dip
-    '[ _ = ] any? ;
+    [
+        factorize-type resolve-typedef [ resolved-primitives ] dip
+        '[ _ = ] any?
+    ] [ 2drop f ] recover ;
 
 : pointer? ( type -- ? )
     [ "*" tail? ] [ "&" tail? ] bi or ;