[Mono-bugs] [Bug 72674][Wis] New - mjs can't handle properly repeated variable declarations

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 17 Feb 2005 02:56:29 -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=72674

--- shadow/72674	2005-02-17 02:56:29.000000000 -0500
+++ shadow/72674.tmp.24351	2005-02-17 02:56:29.000000000 -0500
@@ -0,0 +1,61 @@
+Bug#: 72674
+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: mjs can't handle properly repeated variable declarations
+
+* Description of Problem:
+ECMAScript allows the repeated declaration of variables or functions.
+
+
+Steps to reproduce the problem:
+Compile both test cases.
+
+Actual Results:
+1. Test case:
+x = undefined
+x = 2
+
+2. Test case:
+Unhandled Exception: System.ArgumentException: Key duplication when adding: f
+in <0x001d7> System.Collections.Hashtable:PutImpl (object,object,bool)
+in <0x00015> System.Collections.Hashtable:Add (object,object)
+in <0x00048> Microsoft.JScript.TypeManager:Operate
+(Microsoft.JScript.TypeManager/Operation,Microsoft.JScript.TypeManager/ManagedType,string,object)
+in <0x00011> Microsoft.JScript.TypeManager:AddMethod
+(string,System.Reflection.Emit.MethodBuilder)
+in <0x000c6> Microsoft.JScript.FunctionDeclaration:Emit
+(Microsoft.JScript.EmitContext)
+in <0x000f1> Microsoft.JScript.Block:Emit (Microsoft.JScript.EmitContext)
+in <0x00011> Microsoft.JScript.ScriptBlock:Emit (Microsoft.JScript.EmitContext)
+in <0x0010a> Microsoft.JScript.CodeGenerator:Emit (Microsoft.JScript.AST)
+in <0x00015> Microsoft.JScript.CodeGenerator:Run (string,Microsoft.JScript.AST)
+in <0x0021b> Microsoft.Vsa.BaseVsaEngine:Compile ()
+in <0x00186> Driver:Main (string[])
+
+
+Expected Results:
+1. Test case:
+x = 1
+x = 2
+
+2. Test case:
+second f
+
+How often does this happen? 
+Always.
+
+Additional Information:
+Version: svn date, Thu Feb 17 01:10:01 CST 2005