[Mono-dev] Where clause on generic delegates

Michał Ziemski rook at roo.k.pl
Thu Aug 17 12:06:08 EDT 2006


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]






More information about the Mono-devel-list mailing list