]> gitweb.factorcode.org Git - factor.git/commitdiff
classes.union: make sure tuple-class has tuple-layout.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 18 Dec 2020 06:19:58 +0000 (22:19 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 18 Dec 2020 06:19:58 +0000 (22:19 -0800)
When tuples are being redefined it's possible for the layout to be f.

core/classes/union/union.factor

index d40f3a0e13f6ec07823ab0fb83e067d3454ef294..9f9afe20a8b4e5733e878f98f1705976a90435c7 100644 (file)
@@ -73,7 +73,7 @@ M: class union-of-builtins?
     class-members
     [ union-of-builtins? ] partition
     [ [ f ] [ builtin-union-predicate-quot ] if-empty ] dip
-    [ tuple-class? ] partition
+    [ [ tuple-class? ] [ tuple-layout ] bi and ] partition
     [ [ f ] [ tuple-union-predicate-quot ] if-empty ] dip
     [ predicate-def ] map
     swap [ suffix ] when*