From: Alex Maestas Date: Wed, 10 Aug 2022 18:17:51 +0000 (+0000) Subject: Infer non-callables as though they're self-evaluating X-Git-Tag: 0.99~1144 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=a7b1d00035d69dbd6c098be1fa82b916cb896d58 Infer non-callables as though they're self-evaluating --- diff --git a/basis/stack-checker/stack-checker.factor b/basis/stack-checker/stack-checker.factor index 3dc9f198ca..09cdc08b25 100644 --- a/basis/stack-checker/stack-checker.factor +++ b/basis/stack-checker/stack-checker.factor @@ -9,7 +9,9 @@ stack-checker.visitor.dummy ; IN: stack-checker : infer ( quot -- effect ) - [ infer-quot-here ] with-infer drop ; + dup callable? + [ [ infer-quot-here ] with-infer drop ] + [ drop ( -- x ) ] if ; : infer. ( quot -- ) ! Safe to call from inference transforms.