[Mono-bugs] [Bug 29114][Wis] New - mcs does not handle error of calling events from outside the declaring type
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
19 Aug 2002 12:16:32 -0000
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 stodden@in.tum.de.
http://bugzilla.ximian.com/show_bug.cgi?id=29114
--- shadow/29114 Mon Aug 19 08:16:32 2002
+++ shadow/29114.tmp.30683 Mon Aug 19 08:16:32 2002
@@ -0,0 +1,57 @@
+Bug#: 29114
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: stodden@in.tum.de
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs does not handle error of calling events from outside the declaring type
+
+Description of Problem:
+
+mcs can throw on Mono.CSharp.EventExpr:Emit()
+
+demo from yuanfenkuo@students.wisc.edu below
+
+Actual Results:
+** (process:26183): WARNING **: unhandled exception System.Exception:
+"Should not happen I think"
+in <0x00030> 00 Mono.CSharp.EventExpr:Emit (Mono.CSharp.EmitContext)
+in <0x0039a> 00 Mono.CSharp.Invocation:EmitCall
+(Mono.CSharp.EmitContext,bool,bool,Mono.CSharp.Expression,System.Reflection.MethodBase,System.Collections.ArrayList,Mono.CSharp.Location)
+in <0x0008b> 00 Mono.CSharp.DelegateInvocation:Emit (Mono.CSharp.EmitContext)
+in <0x00014> 00 Mono.CSharp.DelegateInvocation:EmitStatement
+(Mono.CSharp.EmitContext)
+in <0x0007b> 00 Mono.CSharp.StatementExpression:Emit (Mono.CSharp.EmitContext)
+in <0x0035f> 00 Mono.CSharp.Block:Emit (Mono.CSharp.EmitContext)
+in <0x001a3> 00 Mono.CSharp.EmitContext:EmitTopBlock
+(Mono.CSharp.Block,Mono.CSharp.InternalParameters,Mono.CSharp.Location)
+in <0x00545> 00 Mono.CSharp.MethodData:Emit
+(Mono.CSharp.TypeContainer,Mono.CSharp.Block,object)
+in <0x0001f> 00 Mono.CSharp.Method:Emit (Mono.CSharp.TypeContainer)
+in <0x001f1> 00 Mono.CSharp.TypeContainer:Emit ()
+in <0x004ca> 00 Mono.CSharp.RootContext:EmitCode ()
+in <0x00761> 00 Mono.CSharp.Driver:MainDriver (string[])
+in <0x0000b> 00 Mono.CSharp.Driver:Main (string[])
+
+
+Expected Results:
+delegate_eric2.cs(13,21): error CS0070: The event 'MyEvent.SomeEvent' can
+only appear on the left hand side of += or -= (except when used from within
+the type 'MyEvent')
+
+
+How often does this happen?
+always
+
+Additional Information:
+attachment delegate_eric2.cs demonstrates the problem.