[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #459: -picky shouldn't warn when other path also retu
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #459: -picky shouldn't warn when other path also returns an undefined value? |
Date: |
Thu, 16 Dec 2010 22:34:09 -0000 |
#459: -picky shouldn't warn when other path also returns an undefined value?
----------------------+-----------------------------------------------------
Reporter: alanpost | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 4.7.0
Component: compiler | Version: 4.6.x
Keywords: |
----------------------+-----------------------------------------------------
I'm not sure this issue can be fixed, but here it goes:
The following code:
{{{
(define (foo)
(if condition (for-each (lambda x x) '(0 1 2))))
}}}
when compiled with '-picky', gives the following warning:
{{{
Warning: in toplevel procedure `foo':
conditional in tail-position has branch with undefined result:
(if condition (let (... ...) (let ... ...)) (##core#undefined))
}}}
However, the other branch *also* returns an undefined result, making this
particular warning a no-op in this case.
I would expect to not see this error when both branches return the same
result.
Is this condition detectable?
--
Ticket URL: <http://bugs.call-cc.org/ticket/459>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #459: -picky shouldn't warn when other path also returns an undefined value?,
Chicken Trac <=