Author: motym
Date: 2007-03-29 04:29:32 -0500 (Thu, 29 Mar 2007)
New Revision: 75126

Modified:
   
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/FlowControl.vb
   
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/Operators.vb
Log:
implementing 
Microsoft.VisualBasic.CompilerServices.FlowControl.CheckForSyncLockOnValueType

Modified: 
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/FlowControl.vb
===================================================================
--- 
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/FlowControl.vb
      2007-03-29 08:50:30 UTC (rev 75125)
+++ 
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/FlowControl.vb
      2007-03-29 09:29:32 UTC (rev 75126)
@@ -49,7 +49,11 @@
         End Sub
 
         Public Shared Sub CheckForSyncLockOnValueType(ByVal obj As Object)
-            Throw New NotImplementedException
+            'obj can not be null (checked by monitor.enter)
+            Dim t As Type = obj.GetType()
+            If (t.IsValueType) Then
+                Throw New ArgumentException("'SyncLock' operand cannot be of 
type '" + t.Name + "' because '" + t.Name + "' is not a reference type.")
+            End If
         End Sub
         Public Shared Function ForEachInArr(ByVal ary As System.Array) As 
System.Collections.IEnumerator
             Throw New NotImplementedException

Modified: 
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/Operators.vb
===================================================================
--- 
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/Operators.vb
        2007-03-29 08:50:30 UTC (rev 75125)
+++ 
trunk/mono-basic/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic.CompilerServices/Operators.vb
        2007-03-29 09:29:32 UTC (rev 75126)
@@ -1205,7 +1205,6 @@
             End If
 
             Dim destTc As TypeCode = DestTypeCodeOpMultiply(o1, o2)
-            Dim tmpLong As Long
             Try
                 Select Case destTc
                     Case TypeCode.Byte

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to