From: Doug Coleman Date: Sat, 25 Feb 2023 19:39:41 +0000 (-0600) Subject: alien.c-types: fix bad use of ?when X-Git-Tag: 0.99~512 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=10e2cf827b258ee38644a631a9ec565a79ce2800 alien.c-types: fix bad use of ?when --- diff --git a/basis/alien/c-types/c-types-tests.factor b/basis/alien/c-types/c-types-tests.factor index b13faf45c7..7c846d0d14 100644 --- a/basis/alien/c-types/c-types-tests.factor +++ b/basis/alien/c-types/c-types-tests.factor @@ -165,3 +165,5 @@ USE: alien.syntax USE: alien.c-types TYPEDEF: void* foo-func " eval( -- ) + +[ void resolve-typedef ] [ T{ no-c-type f void } = ] must-fail-with diff --git a/basis/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor index 8d645132b2..fa6b8a9351 100644 --- a/basis/alien/c-types/c-types.factor +++ b/basis/alien/c-types/c-types.factor @@ -54,7 +54,7 @@ UNION: c-type-name c-type-word pointer ; : resolve-typedef ( name -- c-type ) - [ void? ] [ no-c-type ] ?when + dup void? [ no-c-type ] when dup c-type-name? [ lookup-c-type ] when ; M: word lookup-c-type