[Mono-bugs] [Bug 76859][Min] New - [G|MCS] NullReferenceException
after parsing error
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Nov 30 00:21:27 EST 2005
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 robertj at gmx.net.
http://bugzilla.ximian.com/show_bug.cgi?id=76859
--- shadow/76859 2005-11-30 00:21:27.000000000 -0500
+++ shadow/76859.tmp.10807 2005-11-30 00:21:27.000000000 -0500
@@ -0,0 +1,94 @@
+Bug#: 76859
+Product: Mono: Compilers
+Version: 1.1
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: robertj at gmx.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [G|MCS] NullReferenceException after parsing error
+
+Steps to reproduce the problem:
+
+1. Compile the following test (this is the smallest sample
+ that reproduces the problem):
+
+using System;
+using System.Reflection;
+
+public class Test
+{
+ const BindingFlags Def = BindingFlags.Private | BindingFlags.Static;
+ const BindingFlags SetBindingFlags = Def | BindingFlags.SetProperty;
+
+ static void Main ()
+ {
+ }
+}
+
+Actual Results:
+
+test.cs(6,34): error CS0117: `System.Reflection.BindingFlags' does not
+contain a definition for `Private'
+test.cs(6,34): error CS0133: The expression being assigned to `Test.Def'
+must be constant
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x00108> Mono.CSharp.Binary: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 <0x00019> Mono.CSharp.Expression:ResolveAsConstant
+(Mono.CSharp.EmitContext ec, Mono.CSharp.MemberCore mc)
+in <0x000a4> Mono.CSharp.Const:ResolveValue ()
+in <0x00183> Mono.CSharp.FieldExpr:ResolveMemberAccess
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression left, Location loc,
+Mono.CSharp.SimpleName original)
+in <0x004b1> Mono.CSharp.SimpleName:DoSimpleNameResolve
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression right_side, Boolean
+intermediate)
+in <0x00030> Mono.CSharp.SimpleName:SimpleNameResolve
+(Mono.CSharp.EmitContext ec, Mono.CSharp.Expression right_side, Boolean
+intermediate)
+in <0x00014> Mono.CSharp.SimpleName:DoResolve (Mono.CSharp.EmitContext ec,
+Boolean intermediate)
+in <0x000d2> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec,
+ResolveFlags flags)
+in <0x00012> Mono.CSharp.Expression:Resolve (Mono.CSharp.EmitContext ec)
+in <0x0010e> Mono.CSharp.Binary: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 <0x00019> Mono.CSharp.Expression:ResolveAsConstant
+(Mono.CSharp.EmitContext ec, Mono.CSharp.MemberCore mc)
+in <0x000a4> Mono.CSharp.Const:ResolveValue ()
+in <0x0002c> Mono.CSharp.Const:Emit ()
+in <0x00076> Mono.CSharp.TypeContainer:EmitConstants ()
+in <0x005c3> Mono.CSharp.TypeContainer:EmitType ()
+in <0x00226> Mono.CSharp.RootContext:EmitCode ()
+in <0x00aac> Mono.CSharp.Driver:MainDriver (System.String[] args)
+in <0x00041> Mono.CSharp.Driver:Main (System.String[] args)
+
+
+
+Expected Results:
+
+
+test.cs(6,34): error CS0117: `System.Reflection.BindingFlags' does not
+contain a definition for `Private'
+test.cs(6,34): error CS0133: The expression being assigned to `Test.Def'
+must be constant
+
+
+How often does this happen?
+
+Always.
More information about the mono-bugs
mailing list