[Mono-bugs] [Bug 78662][Min] New - mcs throws NRE instead of
reporting CS0019 error
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Jun 16 09:32:36 EDT 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 vargaz at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=78662
--- shadow/78662 2006-06-16 09:32:36.000000000 -0400
+++ shadow/78662.tmp.32620 2006-06-16 09:32:36.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 78662
+Product: Mono: Compilers
+Version: 1.0
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: vargaz at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs throws NRE instead of reporting CS0019 error
+
+Testcase:
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+public class PerformanceTest2 {
+ public static void Main ( String[] args ) {
+ uint j, k;
+
+ j = 0;
+ k = ( (byte) 1 << ( 7 - j % 8 ));
+ }
+}
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+Expected results:
+bug.cs(7,9): error CS0019: Operator '<<' cannot be applied to operands of
+type 'byte' and 'uint'
+
+Actual results:
+Exception caught by the compiler while compiling:
+ Block that caused the problem begin at: bug2.cs(3,21):
+ Block being compiled: [bug2.cs(3,46):,bug2.cs(8,2):]
+System.NullReferenceException: A null value was found where an object
+instance was required.
+
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required.
+ at Mono.CSharp.Binary.Error_OperatorCannotBeApplied () [0x00000]
+ at Mono.CSharp.Binary.CheckShiftArguments (Mono.CSharp.EmitContext ec)
+[0x00000]
+ at Mono.CSharp.Binary.ResolveOperator (Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.Binary.DoResolve (Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec,
+ResolveFlags flags) [0x00000]
+ at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.Assign.DoResolve (Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec,
+ResolveFlags flags) [0x00000]
+ at Mono.CSharp.Expression.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.ExpressionStatement.ResolveStatement
+(Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.EmitContext ec)
+[0x00000]
+ at Mono.CSharp.Block.Resolve (Mono.CSharp.EmitContext ec) [0x00000]
+ at Mono.CSharp.EmitContext.ResolveTopBlock (Mono.CSharp.EmitContext
+anonymous_method_host, Mono.CSharp.ToplevelBlock block,
+Mono.CSharp.Parameters ip, IMethodData md, System.Boolean unreachable)
+[0x00000]
More information about the mono-bugs
mailing list