[Mono-bugs] [Bug 77679][Nor] New - error CS1628 crashes the compiler
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Mar 1 09:29:28 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 felipe.lessa at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77679
--- shadow/77679 2006-03-01 09:29:28.000000000 -0500
+++ shadow/77679.tmp.7559 2006-03-01 09:29:28.000000000 -0500
@@ -0,0 +1,94 @@
+Bug#: 77679
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details: Debian package 1.1.13.2-1
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: felipe.lessa at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: error CS1628 crashes the compiler
+
+Description of Problem:
+Instead of just issuing the error CS1628 ("Cannot use ref or out parameter
+`%s' inside an anonymous method block") the compiler crashes.
+
+Steps to reproduce the problem:
+1. Try to compile the file in "Additional information".
+
+Actual Results:
+test.cs(5,25): error CS1628: Cannot use ref or out parameter `i' inside an
+anonymous method block
+Exception caught by the compiler while compiling:
+ Block that caused the problem begin at: test.cs(4,44):
+ Block being compiled: [test.cs(4,53):,test.cs(6,17):]
+System.NullReferenceException: Object reference not set to an instance of
+an object
+Exception caught by the compiler while compiling:
+ Block that caused the problem begin at: test.cs(2,21):
+ Block being compiled: [test.cs(4,17):,Internal(1,1):]
+System.NullReferenceException: Object reference not set to an instance of
+an object
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x0000a> Mono.CSharp.FlowBranching+UsageVector:IsAssigned
+(Mono.CSharp.VariableInfo var)
+in <0x0001a> Mono.CSharp.FlowBranching:IsAssigned (Mono.CSharp.VariableInfo vi)
+in <0x00035> Mono.CSharp.ParameterReference:IsAssigned
+(Mono.CSharp.EmitContext ec, Location loc)
+in <0x0004b> Mono.CSharp.ParameterReference: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 <0x00168> 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 <0x0001a> Mono.CSharp.UnaryMutator: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)
+
+
+Expected Results:
+test.cs(5,25): error CS1628: Cannot use ref or out parameter `i' inside an
+anonymous method block
+Compilation failed: 1 error(s), 0 warnings
+
+How often does this happen?
+Always.
+
+Additional Information:
+
+public class Test {
+ public void test(out int i) {
+ i = 0;
+ System.EventHandler test = delegate {
+ o++;
+ };
+ }
+}
More information about the mono-bugs
mailing list