[Mono-bugs] [Bug 73282][Min] New - Partial class with attribute causes mcs to crash

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 3 Mar 2005 09:29:53 -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 nazgul@omega.pl.

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

--- shadow/73282	2005-03-03 09:29:53.000000000 -0500
+++ shadow/73282.tmp.19107	2005-03-03 09:29:53.000000000 -0500
@@ -0,0 +1,70 @@
+Bug#: 73282
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: Mandrake 10.1, mono svn from 2005.03.02
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: nazgul@omega.pl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Partial class with attribute causes mcs to crash
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+The program below makes mcs throw exception
+
+Steps to reproduce the problem:
+1. Try to compile
+class MYAttr : System.Attribute {
+}
+
+[MYAttr]
+partial class A {
+  static void Main () {
+  }
+}
+
+partial class A {
+  int i;
+}
+
+
+
+Actual Results:
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x00210> Mono.CSharp.DeclSpace:LookupType (System.String name, Location
+loc, Boolean silent, Boolean ignore_cs0104)
+in <0x00034> Mono.CSharp.SimpleName:ResolveAsTypeStep
+(Mono.CSharp.EmitContext ec)
+in <0x00097> Mono.CSharp.Attribute:ResolvePossibleAttributeTypes
+(Mono.CSharp.EmitContext ec, System.Type t1, System.Type t2)
+in <0x00038> Mono.CSharp.Attribute:CheckAttributeType
+(Mono.CSharp.EmitContext ec)
+in <0x00028> Mono.CSharp.Attribute:ResolveType (Mono.CSharp.EmitContext ec)
+in <0x0007d> Mono.CSharp.Attributes:Search (System.Type t,
+Mono.CSharp.EmitContext ec)
+in <0x00085> Mono.CSharp.MemberCore:GetObsoleteAttribute
+(Mono.CSharp.DeclSpace ds)
+in <0x00096> Mono.CSharp.MethodData:Emit (Mono.CSharp.TypeContainer
+container, Mono.CSharp.Attributable kind)
+in <0x00022> Mono.CSharp.Method:Emit ()
+in <0x0057a> Mono.CSharp.TypeContainer:EmitType ()
+in <0x00206> Mono.CSharp.RootContext:EmitCode ()
+in <0x00c3c> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x0000f> Mono.CSharp.Driver:Main (System.String[] args)
+
+
+Expected Results:
+Compilation succeeded
+
+How often does this happen? 
+Always