chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] #898: scrutinizer gives spurious warnings when given


From: Chicken Trac
Subject: [Chicken-janitors] #898: scrutinizer gives spurious warnings when given too many type hints
Date: Tue, 14 Aug 2012 10:35:36 -0000

#898: scrutinizer gives spurious warnings when given too many type hints
-------------------------+--------------------------------------------------
 Reporter:  megane       |       Owner:       
     Type:  defect       |      Status:  new  
 Priority:  minor        |   Milestone:       
Component:  scrutinizer  |     Version:  4.8.x
 Keywords:  types        |  
-------------------------+--------------------------------------------------
 This is potentially confusing for users of eggs for which type annotations
 are added afterwards.

 Initially the user's own annotations seem to work. When the annotations
 are added to the egg, user starts to get these strange messages shown
 below.

 {{{
 (define-record foo a)
 (define-type foo-t (struct foo))

 (define (t1)
   (the foo-t (the foo-t (make-foo))))   ; OK

 (define (t2)
   (the (struct foo) (the (struct foo) (make-foo))))

 (: bar (procedure () (struct foo)))
 (define (bar)
   (make-foo))

 (define (t3)
   (the (struct foo) (bar)))


 ;; $ csc -verbose -specialize  foo.scm

 ;; Note: in toplevel procedure `t2':
 ;;   expression returns a result of type `(struct foo)', but is declared
 to return `(struct foo)', which is not a subtype

 ;; Note: in toplevel procedure `t3':
 ;;   expression returns a result of type `(struct foo)', but is declared
 to return `(struct foo)', which is not a subtype
 }}}

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/898>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

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