[Mono-dev] Where clause on generic delegates

Rafael Teixeira monoman at gmail.com
Fri Aug 18 10:13:29 EDT 2006


Please file a bug report.

Thanks,

On 8/17/06, Michał Ziemski <rook at roo.k.pl> wrote:
> Hi!
>
> GMCS crashes when a "where" clause is used on a generic delegate.
> I am using
> Mono C# compiler version 1.1.16.1 on FC4
>
> Should I file a bug for this one?
> I would be grateful for assistance as this hinders my work :(
>
> Compiling
>     public interface IReplaceable<T>
>     {
>         bool Valid { get; }
>     }
>
>     public class NalBase
>     {
>         private delegate void AddAlgStrDelegate<T>(T als)
>             where T : IReplaceable<T>;
>     }
>
> Crashes with:
> Unhandled Exception: System.ArgumentNullException: null key
> Parameter name: key
>   at System.Collections.Hashtable.get_Item (System.Object key) [0x00000]
>   at Mono.CSharp.AttributeTester.GetObsoleteAttribute (System.Type type)
> [0x00000]
>   at Mono.CSharp.Expression.ResolveAsTypeTerminal (IResolveContext ec,
> Boolean silent) [0x00000]
>   at Mono.CSharp.TypeArguments.Resolve (IResolveContext ec) [0x00000]
>   at Mono.CSharp.ConstructedType.DoResolveType (IResolveContext ec)
> [0x00000]
>   at Mono.CSharp.ConstructedType.ResolveConstructedType (IResolveContext
> ec) [0x00000]
>   at Mono.CSharp.ConstructedType.DoResolveAsTypeStep (IResolveContext
> ec) [0x00000]
>   at Mono.CSharp.TypeExpr.ResolveAsTypeStep (IResolveContext ec, Boolean
> silent) [0x00000]
>   at Mono.CSharp.SimpleName.ResolveAsTypeStep (IResolveContext ec,
> Boolean silent) [0x00000]
>   at Mono.CSharp.Constraints.Resolve (IResolveContext ec) [0x00000]
>   at Mono.CSharp.TypeParameter.Resolve (Mono.CSharp.DeclSpace ds) [0x00000]
>   at Mono.CSharp.Delegate.DefineType () [0x00000]
>   at Mono.CSharp.TypeContainer.DefineNestedTypes () [0x00000]
>   at Mono.CSharp.TypeContainer.DefineType () [0x00000]
>   at Mono.CSharp.Class.DefineType () [0x00000]
>   at Mono.CSharp.RootContext.ResolveTree () [0x00000]
>   at Mono.CSharp.Driver.MainDriver (System.String[] args) [0x00000]
>   at Mono.CSharp.Driver.Main (System.String[] args) [0x00000]
>
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


-- 
Rafael "Monoman" Teixeira
---------------------------------------
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw


More information about the Mono-devel-list mailing list