[Mono-list] Delegate compile error

Richard Torkar richard.torkar@htu.se
24 Feb 2003 08:30:14 +0100


On Mon, 2003-02-24 at 03:31, Brian Ritchie wrote:
> The following snippet is causing an error when compiling with mcs (on 
> cygwin).  csc works fine.
> 
> namespace Test
> {
> 	public delegate void CloseFTP();
> }
> 
> Unhandled Exception: System.NotSupportedException: Type CloseFTP was not 
> completed.
>    at System.Reflection.Emit.ModuleBuilder.PreSave(String fileName)
>    at System.Reflection.Emit.AssemblyBuilder.Save(String assemblyFileName)
>    at Mono.CSharp.CodeGen.Save(String name)
>    at Mono.CSharp.Driver.MainDriver(String[] args)
>    at Mono.CSharp.Driver.Main(String[] args)
> (null)
> 
> Any ideas?  Am I doing something wrong...or...Should I log it as a bug?
> 

I could compile it as a library just fine:

$ cat lalle.cs
namespace Test
{
public delegate void CloseFTP();
}

$ mcs /t:library lalle.cs
Compilation succeeded

$ ls lalle.dll
lalle.dll


/Richard
-- 
Ph.D. Student
Dept. of Informatics and Mathematics
HTU