public readonly ToplevelBlock Block;
public readonly int ModFlags;
- public readonly Type ReturnType;
+ public Type ReturnType;
public readonly TypeContainer Host;
//
Report.Debug (64, "RESOLVE ANONYMOUS METHOD", this, Location, ec,
RootScope, Parameters, ec.IsStatic);
+ if (ReturnType != null) {
+ TypeExpr return_type_expr;
+ if (RootScope != null)
+ return_type_expr = RootScope.InflateType (ReturnType);
+ else
+ return_type_expr = new TypeExpression (ReturnType, Location);
+ return_type_expr = return_type_expr.ResolveAsTypeTerminal (ec, false);
+ if ((return_type_expr == null) || (return_type_expr.Type == null))
+ return false;
+ ReturnType = return_type_expr.Type;
+ }
+
aec = new EmitContext (
ec.ResolveContext, ec.TypeContainer,
RootScope != null ? RootScope : Host, Location, null, ReturnType,
/// The value that is allowed to be returned or NULL if there is no
/// return type.
/// </summary>
- public Type ReturnType;
+ public readonly Type ReturnType;
/// <summary>
/// Points to the Type (extracted from the TypeContainer) that
--- /dev/null
+using System;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+
+class X
+{
+ public delegate T ModuleBinder<T> (object o);
+
+ public ModuleBinder<TDelegate> CreateMethodUnscoped<TDelegate> ()
+ {
+ return delegate (object o) {
+ return (TDelegate)(object)null;
+ };
+ }
+
+ static void Main ()
+ { }
+}