Modifies clause error on a changed object

后端 未结 1 729
我在风中等你
我在风中等你 2021-01-20 23:57

How can I state (in Dafny) an \"ensures\" guarantee that the object returned by a method will be \"new\", i.e., will not be the same as an object used anywhere else (ye

相关标签:
1条回答
  • 2021-01-21 00:35

    You can say ensures fresh(b) on newArray.

    fresh means exactly what you described: the object is not the same as any object that was allocated before the call to newArray.

    0 讨论(0)
提交回复
热议问题