Skip to content

Duplicate identifier due to quantifier #872

Description

@Aurel300
method test() {
    assert forall i: Int :: true
    var i: Int
}

This reports a duplicate identifier. It disappears if I e.g. put the two statements in separate control-flow paths. I understand that if the two lines were in the opposite order, the quantifier would be shadowing the local varaibe i, but in this order it doesn't. (Is this because we hoist variable declarations to the beginning of the block?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions