make-absolute-pathname type inconsistencies? pasted by siiky on Sat Feb 19 02:12:11 2022

(import chicken.pathname)
(make-absolute-pathname #f #f #f)

; $ csc make-absolute-pathname.scm
;
;
; Warning: Invalid argument
;   In file `make-absolute-pathname.scm:2',
;   At the toplevel,
;   In procedure call:
; 
;     (chicken.pathname#make-absolute-pathname #f #f #f)
; 
;   Argument #2 to procedure `make-absolute-pathname' has an invalid type:
; 
;     false
; 
;   The expected type is:
; 
;     string
; 
;   This is the expression:
; 
;     #f
; 
;   Procedure `make-absolute-pathname' from module `chicken.pathname' has this type:
; 
;     (* #!optional string string -> string)
; 
; Warning: Invalid argument
;   In file `make-absolute-pathname.scm:2',
;   At the toplevel,
;   In procedure call:
; 
;     (chicken.pathname#make-absolute-pathname #f #f #f)
; 
;   Argument #3 to procedure `make-absolute-pathname' has an invalid type:
; 
;     false
; 
;   The expected type is:
; 
;     string
; 
;   This is the expression:
; 
;     #f
; 
;   Procedure `make-absolute-pathname' from module `chicken.pathname' has this type:
; 
;     (* #!optional string string -> string)

types.db patch for make-absolute-pathname added by siiky on Sat Feb 19 12:52:35 2022

(import chicken.pathname)
(make-absolute-pathname 2 #f #f)

; With updated types.db
;
; Warning: Invalid argument
;   In file `make-absolute-pathname.scm:2',
;   At the toplevel,
;   In procedure call:
; 
;     (chicken.pathname#make-absolute-pathname 2 #f #f)
; 
;   Argument #1 to procedure `make-absolute-pathname' has an invalid type:
; 
;     fixnum
; 
;   The expected type is:
; 
;     (or string (list-of string) false)
; 
;   This is the expression:
; 
;     2
; 
;   Procedure `make-absolute-pathname' from module `chicken.pathname' has this type:
; 
;     ((or string (list-of string) false)
;      #!optional
;      (or string false)
;      (or string false)
;      ->
;      string)
;
;
; Patch:
;
;diff --git a/types.db b/types.db
;index efc15036..e1de2124 100644
;--- a/types.db
;+++ b/types.db
;@@ -1577,7 +1577,7 @@
; (chicken.pathname#decompose-directory (#(procedure #:clean #:enforce) chicken.pathname#decompose-directory (string) * * *))
; (chicken.pathname#decompose-pathname (#(procedure #:clean #:enforce) chicken.pathname#decompose-pathname (string) * * *))
; (chicken.pathname#directory-null? (#(procedure #:clean #:enforce) chicken.pathname#directory-null? (string) boolean))
;-(chicken.pathname#make-absolute-pathname (#(procedure #:clean #:enforce) chicken.pathname#make-absolute-pathname (* #!optional string string) string))
;+(chicken.pathname#make-absolute-pathname (#(procedure #:clean #:enforce) chicken.pathname#make-absolute-pathname ((or string (list-of string) false) #!optional (or string false) (or string false)) string))
; (chicken.pathname#make-pathname (#(procedure #:clean #:enforce) chicken.pathname#make-pathname ((or string (list-of string) false) #!optional (or string false) (or string false)) string))
; (chicken.pathname#normalize-pathname (#(procedure #:clean #:enforce) chicken.pathname#normalize-pathname (string #!optional symbol) string))
; (chicken.pathname#pathname-directory (#(procedure #:clean #:enforce) chicken.pathname#pathname-directory (string) *))