summaryrefslogtreecommitdiff
path: root/Source/CodeContractsExtender
diff options
context:
space:
mode:
authorGravatar mikebarnett <unknown>2011-03-07 05:15:14 +0000
committerGravatar mikebarnett <unknown>2011-03-07 05:15:14 +0000
commit241de8264a32285d371a53d8d91a219625d76922 (patch)
treebde7c8c1dead587fc23a131810cf32779d7e9c8f /Source/CodeContractsExtender
parent0cd15d2b78a68bcdc566b31d53287f63625560e7 (diff)
Fix contracts so runtime checking can be turned on.
Diffstat (limited to 'Source/CodeContractsExtender')
-rw-r--r--Source/CodeContractsExtender/cce.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CodeContractsExtender/cce.cs b/Source/CodeContractsExtender/cce.cs
index ef594484..64b6527a 100644
--- a/Source/CodeContractsExtender/cce.cs
+++ b/Source/CodeContractsExtender/cce.cs
@@ -16,7 +16,8 @@ public static class cce {
//}
[Pure]
public static T NonNull<T>(T t) {
- Contract.Assert(t != null);
+ Contract.Requires(t != null);
+ Contract.Ensures(Contract.Result<T>() != null);
return t;
}
[Pure]