Mono + Anonymous delegates
Tried to get my code to compile but i got this error:
cyrusn@Foo ~> /opt/local/bin/gmcs foo.cs
Mono C# Compiler 0.91.0.0 for Generics
System.NullReferenceException: Object reference not set to an instance of an object
in <0x14828> Mono.CSharp.CSharpParser:yyparse (Mono.CSharp.yyParser.yyInput)
in <0x000b4> Mono.CSharp.CSharpParser:parse ()
foo.cs(30) error CS8025: Parsing error
Compilation failed: 1 error(s), 0 warnings
Not encouraged by the exception, but it is experimental code in a piece of beta software. (and my own code throws exceptions, so who am i to talk :-) ). However, it did give me the line number (yaaay). I went there and saw that it was this bit of code:
public Creator<>> Drop(int elements) {<br> return delegate { return this; };<br> }
I'm wondering if it's anonymous delegates. I'll see if i can figure out what's going on and maybe how to work around it. I also filed this this bug to help out the mono developers.
Comments
Anonymous
May 16, 2004
anonymous delegates aren't fully implemented yet, afaik - last i heard, miguel was working on them with a seperate branch, and it hasn't been merged back into the main codebase yet. The last time he mentioned it on his blog (http://primates.ximian.com/~miguel/activity-log.php) was in the middle of April, and i don't recall seeing anything significant on the subject on the mailing listAnonymous
May 16, 2004
Anonymous methods are not part of the main tree at this point, I will correct the error above (I should not have turned v2 features on by default yet).
As for the generics compiler: you must use thegmcs' program, not
mcs'.Anonymous
May 16, 2004
Thanks for the info Arhra/Miguel. From the mono roadmap http://www.go-mono.com/mono-roadmap.html it looks like these feature are expected late 2004. Is that correct? If so, i'm looking forward to seeing them become available so quickly!Anonymous
June 26, 2007
PingBack from http://blog.tomtebo.org/2004/05/18/quickies_of_the_day-5/Anonymous
March 17, 2008
PingBack from http://blogrssblog.info/cyrus-blather-mono-and-generics/Anonymous
May 29, 2009
PingBack from http://paidsurveyshub.info/story.php?title=cyrus-blather-mono-anonymous-delegates