multiple-value type assertion stupidity
Bug #655581 reported by
Nikodemus Siivola
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
Bug Description
(compile nil `(lambda (s) (the (unsigned-byte 8) (read-byte s))))
gives
; (THE (UNSIGNED-BYTE 8) (READ-BYTE S))
;
; note: type assertion too complex to check:
; (VALUES (UNSIGNED-BYTE 8) &REST T).
This is silly.
While (THE X (FOO)) is too complex to check when the number of values returned by FOO is in doubt, here we know that READ-BYTE will only return a single value -- and hence we could simplify the assertion to (VALUES (UNSIGNED-BYTE 8) &OPTIONAL).
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I misdiagnosed this initially.
The issue is really that READ-BYTE has been declared NOTINLINE, and NOTLINE currently has the side-effect of stopping the compiler from utilizing the proclaimed FTYPE.