summaryrefslogtreecommitdiff
path: root/Source/UnitTests/CoreTests/ExprImmutability.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Source/UnitTests/CoreTests/ExprImmutability.cs')
-rw-r--r--Source/UnitTests/CoreTests/ExprImmutability.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/UnitTests/CoreTests/ExprImmutability.cs b/Source/UnitTests/CoreTests/ExprImmutability.cs
index 68b71083..e13feca7 100644
--- a/Source/UnitTests/CoreTests/ExprImmutability.cs
+++ b/Source/UnitTests/CoreTests/ExprImmutability.cs
@@ -89,6 +89,13 @@ namespace CoreTests
// Trying to assign the same Type should succeed
e.Type = BasicType.Bool;
}
+
+ [Test(), ExpectedException(typeof(InvalidOperationException))]
+ public void ProtectedOldExpr()
+ {
+ var e = new OldExpr(Token.NoToken, Expr.True, /*immutable=*/ true);
+ e.Expr = Expr.False;
+ }
}
}