Dead code in occurs? function

Description

In the cond in the occurs? function, this condition:

(zip/end? z) false

appears twice. Unless I very much misunderstand, the second clause will never succeed.

Also, I'm wondering if it makes sense (in core.unify) for composite? to be true for strings. It looks like this means occurs? will futilely check each character of a string looking for variables.

Environment

None

Activity

Show:

Michael Fogus September 2, 2022 at 7:07 PM

Removed unreachable cord branch in `occurs?`.

Michael Fogus September 2, 2022 at 7:07 PM

I don’t think that we make strings resolve as true in composite?. Thank you for pointing out the dead branch!

Fixed

Details

Assignee

Reporter

Priority

Created July 29, 2013 at 1:06 AM
Updated September 2, 2022 at 7:07 PM
Resolved September 2, 2022 at 7:07 PM