mirror of
https://github.com/Z3Prover/z3
synced 2025-06-14 09:56:15 +00:00
Mark void DummyContracts as Conditional to avoid compiling their arguments.
This commit is contained in:
parent
f7ebe16046
commit
3370adcdff
1 changed files with 6 additions and 0 deletions
|
@ -44,15 +44,21 @@ namespace System.Diagnostics.Contracts
|
||||||
|
|
||||||
public static class Contract
|
public static class Contract
|
||||||
{
|
{
|
||||||
|
[Conditional("false")]
|
||||||
public static void Ensures(bool b) { }
|
public static void Ensures(bool b) { }
|
||||||
|
[Conditional("false")]
|
||||||
public static void Requires(bool b) { }
|
public static void Requires(bool b) { }
|
||||||
|
[Conditional("false")]
|
||||||
public static void Assume(bool b, string msg) { }
|
public static void Assume(bool b, string msg) { }
|
||||||
|
[Conditional("false")]
|
||||||
public static void Assert(bool b) { }
|
public static void Assert(bool b) { }
|
||||||
public static bool ForAll(bool b) { return true; }
|
public static bool ForAll(bool b) { return true; }
|
||||||
public static bool ForAll(Object c, Func<Object, bool> p) { return true; }
|
public static bool ForAll(Object c, Func<Object, bool> p) { return true; }
|
||||||
public static bool ForAll(int from, int to, Predicate<int> p) { return true; }
|
public static bool ForAll(int from, int to, Predicate<int> p) { return true; }
|
||||||
|
[Conditional("false")]
|
||||||
public static void Invariant(bool b) { }
|
public static void Invariant(bool b) { }
|
||||||
public static T[] Result<T>() { return new T[1]; }
|
public static T[] Result<T>() { return new T[1]; }
|
||||||
|
[Conditional("false")]
|
||||||
public static void EndContractBlock() { }
|
public static void EndContractBlock() { }
|
||||||
public static T ValueAtReturn<T>(out T v) { T[] t = new T[1]; v = t[0]; return v; }
|
public static T ValueAtReturn<T>(out T v) { T[] t = new T[1]; v = t[0]; return v; }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue