[Mono-bugs] [Bug 77809][Wis] New - Unhandled exception when trying to set a internal get-only property

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Mar 16 21:23:32 EST 2006

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 slomo at ubuntu.com.


--- shadow/77809	2006-03-16 21:23:32.000000000 -0500
+++ shadow/77809.tmp.20729	2006-03-16 21:23:32.000000000 -0500
@@ -0,0 +1,90 @@
+Bug#: 77809
+Product: Mono: Compilers
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: slomo at ubuntu.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Unhandled exception when trying to set a internal get-only property
+when doing the following mcs crashes with an unhandled exception:
+mcs -out:test.dll -target:library test2.cs
+mcs -out:test.exe test.cs -r:test.dll
+Exception caught by the compiler while compiling:
+   Block that caused the problem begin at: test.cs(5,21):
+                     Block being compiled: [test.cs(5,41):,test.cs(7,2):]
+System.ArgumentNullException: null key
+Parameter name: key
+Unhandled Exception: System.ArgumentNullException: null key
+Parameter name: key
+in <0x00182> System.Collections.Hashtable:get_Item (System.Object key)
+in <0x0001b> Mono.CSharp.TypeManager:GetParameterData
+(System.Reflection.MethodBase mb)
+in <0x00052> Mono.CSharp.TypeManager:GetFullNameSignature
+(System.Reflection.MemberInfo mi)
+in <0x0000d> Mono.CSharp.PropertyExpr:GetSignatureForError ()
+in <0x00438> Mono.CSharp.SimpleName:DoSimpleNameResolve
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression right_side, Boolean
+in <0x00030> Mono.CSharp.SimpleName:SimpleNameResolve
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression right_side, Boolean
+in <0x00012> Mono.CSharp.SimpleName:DoResolveLValue
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression right_side)
+in <0x00022> Mono.CSharp.Expression:ResolveLValue (Mono.CSharp.EmitContext
+ec, Mono.CSharp.Expression right_side, Location loc)
+in <0x00297> Mono.CSharp.Assign:DoResolve (Mono.CSharp.EmitContext ec)
+in <0x000e3> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec,
+ResolveFlags flags)
+in <0x00012> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec)
+in <0x00013> Mono.CSharp.ExpressionStatement:ResolveStatement
+(Mono.CSharp.EmitContext ec)
+in <0x0001f> Mono.CSharp.StatementExpression:Resolve
+(Mono.CSharp.EmitContext ec)
+in <0x001d9> Mono.CSharp.Block:Resolve (Mono.CSharp.EmitContext ec)
+in <0x00122> Mono.CSharp.EmitContext:ResolveTopBlock
+(Mono.CSharp.EmitContext anonymous_method_host, Mono.CSharp.ToplevelBlock
+block, Mono.CSharp.Parameters ip, IMethodData md, System.Boolean unreachable)
+this is with mono and happens always. When setting the property to
+public the correct error (get-only property, CS0200) is printed by mcs. The
+same correct behaviour happens when compiling both files in one assembly.
+Below are the two test files.
+using System;
+public class Test : Foo {
+	public static void Main(string[] args) {
+		Test = false;
+	}
+using System;
+public class Foo {
+	internal static bool Test {
+		get { return true; }
+	}

More information about the mono-bugs mailing list