USING: accessors combinators combinators.private compiler.test
compiler.tree compiler.tree.builder compiler.tree.debugger
compiler.tree.optimizer compiler.tree.propagation.call-effect
+compiler.tree.propagation.info
compiler.units effects eval fry kernel kernel.private math sequences
tools.test ;
IN: compiler.tree.propagation.call-effect.tests
{ } [ "IN: compiler.tree.propagation.call-effect.tests TUPLE: my-tuple a b ;" eval( -- ) ] unit-test
[ 1 2 3 my-quot my-word ] [ wrong-values? ] must-fail-with
+
+! Regression
+[ composed <class-info> (infer-value) ] [ uninferable? ] must-fail-with
+{ t } [ [ 1 ] [ 2 ] compose <literal-info> (infer-value) ( -- x x ) effect= ] unit-test
+{ } [ "IN: compiler.tree.propagation.call-effect.tests USE: kernel.private : blub ( x -- ) { composed } declare call( -- ) ;" eval( -- ) ] unit-test
[ already-inlined-quot? [ uninferable ] when ]
[ safe-infer dup +unknown+ = [ uninferable ] when ] tri
] [
- dup class>> {
+ dup { [ slots>> empty? not ] [ class>> ] } 1&& {
{ \ curried [ slots>> third (infer-value) remove-effect-input ] }
{ \ composed [ slots>> last2 [ (infer-value) ] bi@ compose-effects ] }
[ uninferable ]