Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small code improvements #6083

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Source/DafnyCore/AST/TypeDeclarations/ArrayClassDecl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ public class ArrayClassDecl : ClassDecl {
public ArrayClassDecl(int dims, ModuleDefinition module, Attributes attrs)
: base(SourceOrigin.NoToken, new Name(SystemModuleManager.ArrayClassName(dims)), module,
[
.. new TypeParameter[]
{ new TypeParameter(SourceOrigin.NoToken, new Name("arg"), TypeParameter.TPVarianceSyntax.NonVariant_Strict) }
new TypeParameter(SourceOrigin.NoToken, new Name("arg"), TypeParameter.TPVarianceSyntax.NonVariant_Strict)
],
[], attrs, false, null) {
Contract.Requires(1 <= dims);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,9 @@ public void TrStmt_CheckWellformed(Expression expr, BoogieStmtListBuilder builde
kv = null; // this is the default behavior of Boogie's assert
} else {
List<object> args = [
// {:subsumption 0}
Bpl.Expr.Literal(0)
];
// {:subsumption 0}
kv = new Bpl.QKeyValue(expr.Origin, "subsumption", args, null);
}
var options = new WFOptions(kv);
Expand Down
2 changes: 1 addition & 1 deletion Source/DafnyRuntime.Tests/CsRuntimeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void TestConcatSequence() {
Thread t = new Thread(delegate () {
left.right = null;
Thread.Sleep(100); // Ensure ComputeElements() does not work immediately
left.elmts = [.. new List<int>() { 1, 2 }];
left.elmts = [1, 2];
});
t.Start();
var result = tree.ComputeElements(); // Without the thread, will loop forever
Expand Down
Loading