aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Instantiator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Instantiator.cs')
-rw-r--r--src/Instantiator.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Instantiator.cs b/src/Instantiator.cs
index 297337ed..b3f070e7 100644
--- a/src/Instantiator.cs
+++ b/src/Instantiator.cs
@@ -890,6 +890,9 @@ namespace Crow.IML
CompilerServices.emitConvert (il, piSource.PropertyType);
+ if (!piSource.CanWrite)
+ throw new Exception ("Source member of bindind is read only:" + piSource.ToString());
+
il.Emit (OpCodes.Callvirt, piSource.GetSetMethod ());
il.MarkLabel (endMethod);