[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] #!rest in type declarations

From: megane
Subject: [Chicken-users] #!rest in type declarations
Date: Sat, 27 Oct 2012 19:49:31 +0300
User-agent: mu4e 0.9.9-dev4; emacs 24.1.1


Consider this example:

(: apply1 (forall (a b) (procedure ((procedure (#!rest a) b) (list-of a)) b)))
(define (apply1 f args)
  (apply f args))

  (compiler-typecase (list 'a 2 3)
    ((list-of (or symbol fixnum)) #t))))

  (compiler-typecase +
    ((procedure (#!rest number) number) #t))))

(apply1 + (list 'a 2 3)) ; <- no type warning


This gives no compilation warnings. 

But shouldn't it warn at the last line that the type of the second
argument is not correct (i.e. not (list-of number))?

Am I missing something?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]