Dino and Jimmy,
Thanks to you both for responding. I'm using Silverlight 4 beta 2, BTW.
I went back and looked again... turns out the issue lies in my DefaultBinder implementation (it being abstract and all), specifically in my implementation of ConvertExpression(). The weird thing is that I expect that my implementation is fairly standard,
so I'm surprised this hasn't come up yet (unless I'm really doing something stupid). Here it is:
public override Expression ConvertExpression( Expression expr, Type toType, ... /* other parms */ )
return Expression.Convert( Utils.SimpleCallHelper( Expression.Constant( this ),
// this default binder instance
this.GetType().GetMethod( "Convert" ),
// standard Convert() override
Expression.Constant( toType ) ),
// <-------- TypeAccessException here... "error attempting to access System.RuntimeType"
Entirely possible I'm missing something, but I have to believe that that's a fairly common implementation of that override. SL4 security definitely doesn't like it. And if I change it to pass toType.FullName as a string to a custom convert method, it works.
Anyways, thanks again for setting me straight on the DefaultBinder... still loving DLR. We're really doing some funky stuff with it, and it just totally kicks ass.