Bug 314657 (MONO58305) - [GMCS]: anonymous methods
Summary: [GMCS]: anonymous methods
Status: RESOLVED FIXED
Alias: MONO58305
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-11 01:42 UTC by Peter Sestoft
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
C# source file demonstrating problem (7.41 KB, text/plain)
2004-05-11 01:42 UTC, Thomas Wiest
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:37:14 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".