~ chicken-core (master) 66e15c95bc9083567f10feab2af9c6cdbb84d890


commit 66e15c95bc9083567f10feab2af9c6cdbb84d890
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Fri Aug 28 15:56:21 2026 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Fri Aug 28 15:56:30 2026 +0200

    fail when trying generate typecheck for unknown user type

diff --git a/support.scm b/support.scm
index d18989ce..0615cbb2 100644
--- a/support.scm
+++ b/support.scm
@@ -1127,6 +1127,7 @@
 	      (if unsafe
 		  `(##sys#slot ,param 1)
 		  `(##sys#slot (##sys#foreign-symbol-argument ,param) 1)) )
+             ((bool void scheme-object) param)
 	     (else
 	      (cond ((and (symbol? t) (lookup-foreign-type t))
 		     => (lambda (t) (next (vector-ref t 0)) ) )
@@ -1171,7 +1172,7 @@
 		       ((nonnull-pointer nonnull-c-pointer)
 			`(##sys#foreign-pointer-argument ,param) )
 		       (else param) ) )
-		    (else param) ) ) ) ) )
+		    (else (quit-compiling "unknown foreign type `~S'" type)) ) ) ) ) )
        (lambda ()
 	 (quit-compiling "foreign type `~S' refers to itself" type)) ) ) ) )
 
Trap