Skip to content

Commit

Permalink
Merge branch 'master' into renameImportsToAvoidNameCollision
Browse files Browse the repository at this point in the history
  • Loading branch information
keyboardDrummer authored Oct 10, 2024
2 parents 1d4e203 + 8f8f585 commit 9eb0197
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Source/DafnyCore/AST/Members/ConstantField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ public override bool CanBeRevealed() {
return true;
}

public bool ContainsHide {
get => throw new NotSupportedException();
set => throw new NotSupportedException();
}
public bool ContainsHide { get; set; }

public new bool IsGhost { get { return this.isGhost; } }
public List<TypeParameter> TypeArgs { get { return new List<TypeParameter>(); } }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// RUN: %verify %s &> "%t"
// RUN: %diff "%s.expect" "%t"

opaque function Foo(x: int): int {
x
}

const C := reveal Foo(); Foo(42)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Dafny program verifier finished with 1 verified, 0 errors
1 change: 1 addition & 0 deletions docs/dev/news/5761.feat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added opaque blocks to the language. Opaque blocks enable improving verification performance. See the documentation for more details.
1 change: 1 addition & 0 deletions docs/dev/news/5779.feat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
By blocks ("... by { ... }") are now available for assert statements, call statements, and the three types of assignments (:=, :-, :|). Also, by blocks should now be more intuitive since they enable proving any assertions on the left-hand side of the 'by', not just the 'outermost' one. For example, previously `assert 3 / x == 1 by { assume x == 3; }` could still give a possible division by zero error, but now it won't.
1 change: 1 addition & 0 deletions docs/dev/news/5823.fix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug that prevented using reveal statement expressions in the body of a constant.

0 comments on commit 9eb0197

Please sign in to comment.