15 Aug 09:15
Bug: Generic Function that returns a Delegate from \-Expression
From: Simon Hengel <simon.hengel <at> web.de>
Subject: Bug: Generic Function that returns a Delegate from \-Expression
Newsgroups: gmane.comp.gnome.mono.devel
Date: 2008-08-15 07:19:06 GMT
Subject: Bug: Generic Function that returns a Delegate from \-Expression
Newsgroups: gmane.comp.gnome.mono.devel
Date: 2008-08-15 07:19:06 GMT
Hello List, I experienced a bug with mono 1.9.1 x64/Linux. Compilation fails (it works with MS csc 3.5.21022.8). Source and gmcs output is attached. $ ./gmcs --version Mono C# compiler version 1.9.1.0 $ gcc --version gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7) Regards, Simon Hengel
using System;
using System.Linq;
using System.Collections.Generic;
static class CurryBug
{ // curry for function of arity 3
//
// this compiles
public static Func<int,Func<int, Func<int,int>>>
curry_for_int_func (this Func<int,int,int,int> f)
{
return arg1 => arg2 => arg3 => f(arg1 , arg2 , arg3);
}
// but his does not
static Func<A,Func<B,Func<C,D>>> curry<A,B,C,D> (this Func<A,B,C,D> f)
(Continue reading)
RSS Feed