[Mono-bugs] [Bug 70402][Wis] New - Crash when casting out params
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 9 Dec 2004 19:00:00 -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 jackson@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=70402
--- shadow/70402 2004-12-09 19:00:00.000000000 -0500
+++ shadow/70402.tmp.27250 2004-12-09 19:00:00.000000000 -0500
@@ -0,0 +1,73 @@
+Bug#: 70402
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: jackson@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Crash when casting out params
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Compile attached program. mcs throws an exception while it should report an
+error.
+
+
+Actual Results:
+Unhandled Exception: System.InvalidCastException: Cannot cast from source
+type to destination type.
+in <0x000fe> Mono.CSharp.Argument:Emit (Mono.CSharp.EmitContext)
+in <0x0023d> Mono.CSharp.Invocation:EmitArguments
+(Mono.CSharp.EmitContext,System.Reflection.MethodBase,System.Collections.ArrayList,bool,Mono.CSharp.LocalTemporary)
+in <0x005fc> Mono.CSharp.Invocation:EmitCall
+(Mono.CSharp.EmitContext,bool,bool,Mono.CSharp.Expression,System.Reflection.MethodBase,System.Collections.ArrayList,Mono.CSharp.Location,bool,bool)
+in <0x00024> Mono.CSharp.Invocation:EmitCall
+(Mono.CSharp.EmitContext,bool,bool,Mono.CSharp.Expression,System.Reflection.MethodBase,System.Collections.ArrayList,Mono.CSharp.Location)
+in <0x000ad> Mono.CSharp.Invocation:Emit (Mono.CSharp.EmitContext)
+in <0x00017> Mono.CSharp.Invocation:EmitStatement (Mono.CSharp.EmitContext)
+in <0x00011> Mono.CSharp.StatementExpression:DoEmit (Mono.CSharp.EmitContext)
+in <0x00024> Mono.CSharp.Statement:Emit (Mono.CSharp.EmitContext)
+in <0x00079> Mono.CSharp.Block:DoEmit (Mono.CSharp.EmitContext)
+in <0x00298> Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext)
+in <0x00079> Mono.CSharp.Block:DoEmit (Mono.CSharp.EmitContext)
+in <0x00298> Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext)
+in <0x000f9> Mono.CSharp.For:DoEmit (Mono.CSharp.EmitContext)
+in <0x00024> Mono.CSharp.Statement:Emit (Mono.CSharp.EmitContext)
+in <0x00079> Mono.CSharp.Block:DoEmit (Mono.CSharp.EmitContext)
+in <0x00298> Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext)
+in <0x00079> Mono.CSharp.Block:DoEmit (Mono.CSharp.EmitContext)
+in <0x00298> Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext)
+in <0x00079> Mono.CSharp.Block:DoEmit (Mono.CSharp.EmitContext)
+in <0x00298> Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext)
+in <0x00079> Mono.CSharp.Block:DoEmit (Mono.CSharp.EmitContext)
+in <0x00298> Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext)
+in <0x00079> Mono.CSharp.Block:DoEmit (Mono.CSharp.EmitContext)
+in <0x00298> Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext)
+in <0x0001a> Mono.CSharp.EmitContext:EmitResolvedTopBlock
+(Mono.CSharp.ToplevelBlock,bool)
+in <0x00062> Mono.CSharp.EmitContext:EmitTopBlock
+(Mono.CSharp.ToplevelBlock,Mono.CSharp.InternalParameters,Mono.CSharp.Location)
+in <0x00469> Mono.CSharp.MethodData:Emit
+(Mono.CSharp.TypeContainer,Mono.CSharp.Attributable)
+in <0x00027> Mono.CSharp.Method:Emit ()
+in <0x005da> Mono.CSharp.TypeContainer:EmitType ()
+in <0x0045c> Mono.CSharp.RootContext:EmitCode ()
+in <0x00cd9> Mono.CSharp.Driver:MainDriver (string[])
+in <0x0000f> Mono.CSharp.Driver:Main (string[])
+
+
+Expected Results:
+convert.cs(20,17): error CS1510: A ref or out argument must be an lvalue
+
+How often does this happen?
+Always