From 2ab28bcd14c2c38567186e9aa20afed2b49321a6 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 29 Jan 2015 02:15:58 +0000 Subject: Prevent a BvConst being changed once constructed. The motivation for doing this is that we would like a LiteralExpr to be immutable when constructed but because the "Val" field can point to a BvConst which is an object it means that although the Val reference cannot change the BvConst could be changed. --- Source/Core/AbsyExpr.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core') diff --git a/Source/Core/AbsyExpr.cs b/Source/Core/AbsyExpr.cs index 7b4900f2..12289c40 100644 --- a/Source/Core/AbsyExpr.cs +++ b/Source/Core/AbsyExpr.cs @@ -680,8 +680,8 @@ namespace Microsoft.Boogie { } public class BvConst { - public BigNum Value; - public int Bits; + public readonly BigNum Value; + public readonly int Bits; public BvConst(BigNum v, int b) { Contract.Assert(v.Signum >= 0); -- cgit v1.2.3