Opened 12 years ago
Closed 12 years ago
#1063 closed defect (fixed)
scrutiny-tests-2.scm contains a bad test but it passes anyway!
| Reported by: | sjamaan | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 4.9.0 |
| Component: | scrutinizer | Version: | 4.8.x |
| Keywords: | Cc: | ||
| Estimated difficulty: |
Description
(predicate list? (l n p) (i f))
This should fail because p is not a proper list. It looks like the scrutinizer optimizes away the actual check(?)
Possibly a duplicate of #1039
Note: See
TracTickets for help on using
tickets.

The reason the assertion fails but the test succeeds anyway is that scrutiny-tests-2.scm is compiled with
-analyze-onlyand never run, just to generate the scrutiny output. If it were run there'd be an unrelated error (letvs.let*, I'll submit something for that shortly).Regarding the scrutiny, the
(list? p)check doesn't generate a warning since the expansion ofassertincludes a call to##sys#error, which (because it isn't pure/clean/etc.) causes the pairp-- which starts the program with type(pair fixnum fixnum)-- to be smashed into simplypair. After that, nothing can be said in the argument type comparison of(not list)andpair.I wonder if the complex type smashing can be safely avoided for
noreturnprocedures?