diff options
author | Michal Strehovsky <michals@microsoft.com> | 2017-08-19 00:21:01 +0300 |
---|---|---|
committer | Michal Strehovsky <michals@microsoft.com> | 2017-08-19 00:21:01 +0300 |
commit | 52e15b8fc4497582dd1112b01c46c76f6203e1b3 (patch) | |
tree | 43bce6919a86167ec028307140748d872ec85d79 /src/System.Private.TypeLoader | |
parent | 3870ea4d5914e3255031bb613a24cd541157288d (diff) |
Improve diagnosability of Expression.Lambda(Expression.Constant(123)).Compile().GetMethodInfo()
Entity framework would like to inspect the MethodInfo obtained from a delegate that points to the LINQ expression interpreter. This will currently throw a very unhelpful exception that makes it look like we're missing metadata - when in fact, we're missing a feature.
EF will ship with a workaround in their 2.0.1 release, but if anyone tries with 2.0.0 (or hits this in any other way), let's give them something more diagnosable.
[tfs-changeset: 1670903]
Diffstat (limited to 'src/System.Private.TypeLoader')
-rw-r--r-- | src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/CallConverterThunk.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/CallConverterThunk.cs b/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/CallConverterThunk.cs index 1038c02b7..ba58a629b 100644 --- a/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/CallConverterThunk.cs +++ b/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/CallConverterThunk.cs @@ -263,11 +263,8 @@ namespace Internal.Runtime.TypeLoader if (thunkKind == ReversePinvokeThunk) { // Special unsupported thunk kind. Similar behavior to the thunks generated by the delegate ILTransform for this thunk kind - - RuntimeTypeHandle thDummy; - bool isOpenResolverDummy; Action throwNotSupportedException = () => { throw new NotSupportedException(); }; - return RuntimeAugments.GetDelegateLdFtnResult(throwNotSupportedException, out thDummy, out isOpenResolverDummy); + return RuntimeAugments.GetDelegateLdFtnResult(throwNotSupportedException, out RuntimeTypeHandle _, out bool _, out bool _); } RuntimeTypeHandle delegateType = RuntimeAugments.GetRuntimeTypeHandleFromObjectReference(delegateObject); |