[Mono-bugs] [Bug 71122][Wis] New - Variables declared in outer scopes when used in a nested scope do not generated properly.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 9 Jan 2005 13:42:07 -0500 (EST)
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 cesar@ciencias.unam.mx.
http://bugzilla.ximian.com/show_bug.cgi?id=71122
--- shadow/71122 2005-01-09 13:42:07.000000000 -0500
+++ shadow/71122.tmp.16747 2005-01-09 13:42:07.000000000 -0500
@@ -0,0 +1,46 @@
+Bug#: 71122
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: JScript
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: cesar@ciencias.unam.mx
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Variables declared in outer scopes when used in a nested scope do not generated properly.
+
+Because of the way code generation for nested functions is implemented,
+when we try to use variables declared in a outer scope in the nested
+function do not get generated, this is because the outer declaration has
+not been generated at that point.
+
+Compiling the attached test case:
+
+$ mjs test.js
+
+Running it with the Rotor runtime (which we suppose is at /tmp)
+
+$ MONO_PATH=/tmp mono test.exe
+
+
+Version: current svn.
+
+Expected output:
+
+1
+
+Actual output:
+
+** ERROR **: Invalid IL code at IL0000 in JScript 0:f
+(object,Microsoft.JScript.Vsa.VsaEngine): IL_0000: stloc.0
+
+
+aborting...
+Aborted