Bugzilla – Bug 314657
[GMCS]: anonymous methods
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by sestoft@dina.kvl.dk 2004-05-10 18:42:06 MST ---- Description of Problem: mcs chokes on generic method in interface. Looks like a parser problem. Steps to reproduce the problem: 1. Compile the attached program Actual Results: Mono C# Compiler 0.91.0.0 for Generics syntax error, got token `OP_GENERICS_LT', expecting OPEN_BRACE OPEN_PARENS ex-gen-class-linkedlist.cs(23) error CS1041: Identifier expected System.NullReferenceException: Object reference not set to an instance of an object in <0x0001a> Mono.CSharp.TypeContainer:AddProperty (Mono.CSharp.Property) in <0x054d1> Mono.CSharp.CSharpParser:yyparse (Mono.CSharp.yyParser.yyInput) in <0x00079> Mono.CSharp.CSharpParser:parse () ex-gen-class-linkedlist.cs(23) error CS8025: Parsing error Expected Results: Program compiles OK. ---- Additional Comments From sestoft@dina.kvl.dk 2004-05-10 18:42:45 MST ---- Created an attachment (id=166019) C# source file demonstrating problem ---- Additional Comments From martin@ximian.com 2004-05-30 17:41:14 MST ---- Simpler test case: using System; using System.Collections.Generic; interface Foo { IMyList<U> Map<U> (); } ---- Additional Comments From martin@ximian.com 2004-07-13 11:59:42 MST ---- The first problem, generic methods in an interface seems to be already fixed, I'm adding gen-60.cs as a test case. However, your test case shows another bug. ---- Additional Comments From martin@ximian.com 2004-07-13 12:23:55 MST ---- Ok, this is about delegates/anonymous methods. Added gen-61.cs for this (still working on it). ---- Additional Comments From martin@ximian.com 2004-07-13 12:39:56 MST ---- The bug Peter originally reported is fixed. However, I like his test case since it also contains a test for anonymous methods. Anonymous methods are not yet implemented in the non-generics MCS, so we need to wait until this is completed. ---- Additional Comments From martin@ximian.com 2004-12-04 15:27:50 MST ---- Fixed in SVN. Imported an attachment (id=166019) Unknown operating system unknown. Setting to default OS "Other".