[Mono-bugs] [Bug 56457][Wis] New - CS1601: Method or delegate parameter cannot be of type
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 4 Apr 2004 12:49:39 -0400 (EDT)
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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=56457
--- shadow/56457 2004-04-04 12:49:39.000000000 -0400
+++ shadow/56457.tmp.28335 2004-04-04 12:49:39.000000000 -0400
@@ -0,0 +1,56 @@
+Bug#: 56457
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CS1601: Method or delegate parameter cannot be of type
+
+We compile the following:
+
+using System;
+
+class T {
+ static void Main () {}
+ void Test (ref TypedReference a)
+ {
+ }
+}
+
+While csc gives:
+
+C:\Inetpub\ftproot>csc t.cs
+t.cs(5,13): error CS1601: Method or delegate parameter cannot be of
+type 'ref System.TypedReference'
+
+If I run MCS on windows, I get:
+C:\Inetpub\ftproot>mcs t.cs
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to
+an instance of an object.
+ at Mono.CSharp.MemberBase.CheckParameters(DeclSpace ds, Type[]
+parameters)
+ at Mono.CSharp.MethodCore.DoDefineParameters()
+ at Mono.CSharp.Method.CheckBase(TypeContainer container)
+ at Mono.CSharp.Method.Define(TypeContainer container)
+ at Mono.CSharp.TypeContainer.DefineMembers(ArrayList list, MemberInfo[]
+defin
+ed_names)
+ at Mono.CSharp.TypeContainer.DoDefineMembers()
+ at Mono.CSharp.TypeContainer.DefineMembers(TypeContainer container)
+ at Mono.CSharp.RootContext.PopulateTypes()
+ at Mono.CSharp.Driver.MainDriver(String[] args)
+ at Mono.CSharp.Driver.Main(String[] args)
+
+But it compiles on Mono.