return errorSuggestion;
}
- var expr = CSharpBinder.CreateCompilerExpression (argumentInfo [0], target);
- var args = CSharpBinder.CreateCompilerArguments (argumentInfo.Skip (1), indexes);
- expr = new Compiler.ElementAccess (expr, args);
- expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr);
+ var ctx = DynamicContext.Create ();
+ var expr = ctx.CreateCompilerExpression (argumentInfo [0], target);
+ var args = ctx.CreateCompilerArguments (argumentInfo.Skip (1), indexes);
+ expr = new Compiler.ElementAccess (expr, args, Compiler.Location.Null);
+ expr = new Compiler.Cast (new Compiler.TypeExpression (ctx.ImportType (ReturnType), Compiler.Location.Null), expr, Compiler.Location.Null);
var binder = new CSharpBinder (this, expr, errorSuggestion);
binder.AddRestrictions (target);
binder.AddRestrictions (indexes);
- return binder.Bind (callingContext, target);
+ return binder.Bind (ctx, callingContext);
}
}
}