Opened 2 weeks ago

#1399 new defect

Scrutinizer produces incorrect procedure types after merge

Reported by: LemonBoy Owned by:
Priority: major Milestone: 4.13.0
Component: scrutinizer Version: 4.12.0
Keywords: Cc:
Estimated difficulty: medium


Suppose we get this expression after scrutinizing some code:

(or (procedure (|#!rest|) noreturn)
    (procedure (* |#!rest|) . *))

At the moment the result of the union is (procedure (#!rest)) which is clearly wrong because it has arity N >= 0 while the second procedure in the or expression has arity N >= 1. Moreover the return type is lost, I'd expect the noreturn to be dropped and * to be used instead.

The result of the miscalculation of the resulting type may or may not be dangerous.

Change History (0)

Note: See TracTickets for help on using tickets.