[Mono-bugs] [Bug 67172][Nor] New - If procedure is define by passing argument by reference and while calling the procedure it is passes by giving parentheses around the variable then it protect it from change.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 30 Sep 2004 02:25:35 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by manishkumarsinha@sify.com.

http://bugzilla.ximian.com/show_bug.cgi?id=67172

--- shadow/67172	2004-09-30 02:25:35.000000000 -0400
+++ shadow/67172.tmp.25508	2004-09-30 02:25:35.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 67172
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Basic
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: manishkumarsinha@sify.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: If procedure is define by passing argument by reference and while calling the procedure it is passes by giving parentheses around the variable then it protect it from change.
+
+Description of Problem:If procedure is define by passing argument by 
+reference and while calling the procedure it is passes by giving 
+parentheses around the variable then it protect it from change 
+
+
+Steps to reproduce the problem:
+1. Imports System
+Module APR_1_4_0
+	Sub F(ByRef p As Integer)
+      p += 1
+   End Sub 
+   
+   Sub Main()
+      Dim a As Integer = 1
+      F((a))
+		if(a<>1)
+		Throw new System.Exception ("#A1, Unexpected behavior in 
+Arguments_ByReferenceB.vb")
+		end if
+   End Sub 
+End Module
+2. Imports System
+Module APR_1_4_0
+	Function F(ByRef p As Integer) as Integer
+      p += 1
+	return p
+   End Function 
+   
+   Sub Main()
+      Dim a As Integer = 1
+	Dim b As Integer = 0
+      b=F((a))
+		if(b=a)
+		Throw new System.Exception ("#A1, Unexpected behavior in 
+Arguments_ByReferenceB.vb")
+		end if
+   End Sub 
+End Module
+3. 
+
+Actual Results:Fail at runtime
+
+
+Expected Results:it should not failed at runtome