Summary

scrutinizer: extend special case for result-type of "list-ref"/"list-tail" to handle nested "(pair ...)" types

Metadata

Description

As pointed out by sjamaan, changeset f335156a069b4be8c3ec90c1c3f5bddb076f2759 doesn't handle nested pair types. This should be added.

Changes and comments

[2014-08-06 11:23:13 UTC] evhan changed status from new to assigned

[2014-08-06 11:23:13 UTC] evhan changed owner from felix to evhan

[2014-08-06 11:23:13 UTC] evhan wrote:

As of 504ec7a30debc416d300157ffb542e660231f08b, nested pair types that have an equivalent (list ...) form are handled correctly (since they're rewritten as such during simplification).

What isn't handled are nested pair types that we can't safely rewrite to (list ...) type forms. So, I think this ticket now boils down to extending the special case s.t. it walks pair type forms as far as possible, too. For example, if foo has type (pair fixnum (pair fixnum *)), (list-ref foo 1) should resolve to type fixnum (even though we don't know for sure whether foo is a proper list).

[2014-10-19 14:37:59 UTC] sjamaan changed status from assigned to closed

[2014-10-19 14:37:59 UTC] sjamaan set resolution to fixed

[2014-10-19 14:37:59 UTC] sjamaan wrote:

Fixed by b946076726a7800301dbf1deac0463829e2498db and more generally/for a few other procedures by the changesets immediately following it.