compiler.tree.propagation.transforms: fix infinite recursion that was breaking prettyprint
parent
f90bc5cdb6
commit
b37bebb17f
|
@ -178,7 +178,13 @@ ERROR: bad-partial-eval quot word ;
|
|||
|
||||
\ instance? [
|
||||
dup classoid?
|
||||
[ predicate-def ] [ drop f ] if
|
||||
[
|
||||
predicate-def
|
||||
! union{ and intersection{ have useless expansions, and recurse infinitely
|
||||
dup { [ length 2 >= ] [ second \ instance? = ] } 1&& [
|
||||
drop f
|
||||
] when
|
||||
] [ drop f ] if
|
||||
] 1 define-partial-eval
|
||||
|
||||
! Shuffling
|
||||
|
|
|
@ -393,7 +393,6 @@ TUPLE: bob a b ;
|
|||
[ "maybe: bob\n" ] [ [ maybe: bob . ] with-string-writer ] unit-test
|
||||
[ "maybe: word\n" ] [ [ maybe: word . ] with-string-writer ] unit-test
|
||||
|
||||
|
||||
TUPLE: har a ;
|
||||
GENERIC: harhar ( obj -- obj )
|
||||
M: maybe: har harhar ;
|
||||
|
@ -408,12 +407,11 @@ M: integer harhar M\\ integer harhar drop ;\n"""
|
|||
[ \ harhar see-methods ] with-string-writer
|
||||
] unit-test
|
||||
|
||||
|
||||
TUPLE: mo { a union{ float integer } } ;
|
||||
TUPLE: fo { a intersection{ fixnum integer } } ;
|
||||
|
||||
[
|
||||
"""USING: classes.union math ;
|
||||
"""USING: math ;
|
||||
IN: prettyprint.tests
|
||||
TUPLE: mo { a union{ float integer } initial: 0 } ;
|
||||
"""
|
||||
|
@ -422,7 +420,7 @@ TUPLE: mo { a union{ float integer } initial: 0 } ;
|
|||
] unit-test
|
||||
|
||||
[
|
||||
"""USING: classes.intersection math ;
|
||||
"""USING: math ;
|
||||
IN: prettyprint.tests
|
||||
TUPLE: fo { a intersection{ fixnum integer } initial: 0 } ;
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue