From 311ad6fd0a7507cfa484258edfc7b8e17737fd27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alejandro=20R=20Sede=C3=B1o?= Date: Fri, 14 Dec 2012 20:42:22 -0500 Subject: [PATCH] Don't use the expanded type if it's a protobuf enum This fixes the unit test that broke in the previous commit --- clos-transform.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clos-transform.lisp b/clos-transform.lisp index ab504d8..82e37c4 100644 --- a/clos-transform.lisp +++ b/clos-transform.lisp @@ -265,6 +265,8 @@ whether or not to pack the field, and (optionally) a set of enum values." (let* ((type (if type-filter (funcall type-filter type) type)) (list-of-list-of (list-of-list-of)) + (type-enum (when (and *protobuf* (symbolp type)) + (find-enum *protobuf* type))) (expanded-type (type-expand type))) (cond ((listp type) @@ -348,7 +350,7 @@ (lisp-type-to-protobuf-type (first tail)) (values type class (packed-type-p class))) (lisp-type-to-protobuf-type type)))))) - ((not (equal type expanded-type)) + ((not (or type-enum (equal type expanded-type))) (clos-type-to-protobuf-type expanded-type)) (t (lisp-type-to-protobuf-type type))))) -- 2.45.2