viperproject / silver

Definition of the Viper intermediate verification language.
Mozilla Public License 2.0
78 stars 43 forks source link

Variable scope with nested scopes #789

Open Aurel300 opened 5 months ago

Aurel300 commented 5 months ago

(Reported by a PV student:)

method test() {
    {
        var i: Int
    }
    var i: Int
}

This causes an AST construction error for the second declaration of i, because it is seen as a duplicate. This is a little strange, and I would expect either: