[Mono-dev] Compilation error on generated code; potential bug?

kuangbad kuangc at gmail.com
Wed Feb 25 16:10:36 EST 2009

Running Mono 2.0 / OSX, I'm trying to compile a CS class which works fine in
Visual Studio / Windows.

The class is generated code from a statistical inference engine Infer.NET.
The class relies on two DLLs that Microsoft Research Cambridge distributes. 

When I run:
gmcs Model_EP.cs /r:Infer.Runtime.dll /r:Infer.Compiler.dll
I get (several of) this error:

Model_EP.cs(1000,96): error CS0309: The type
`MicrosoftResearch.Infer.Distributions.Discrete' must be convertible to
in order to use it as parameter `T' in the generic type or method

Am I doing something wrong? If not, perhaps there may be a Mono issue.
Without diving too much into the details of this code, Mono may be getting
confused by the two versions of LogEvidenceRatio on UnaryOp<int>. For a more
detailed discussion:

Files to reproduce the issue are here: http://www.sendspace.com/file/zpjn4m

Any help is much appreciated.

It'd be great to get this great statistical inference engine running on
View this message in context: http://www.nabble.com/Compilation-error-on-generated-code--potential-bug--tp22211869p22211869.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

More information about the Mono-devel-list mailing list