[netcore] Make System.Linq.Expressions.Tests.BindTests.GlobalField Pass (#15658)
commite8d7f7c0045a38c41a70f6d0a21ef3ccf9a21662
authorMaxim Lipnin <v-maxlip@microsoft.com>
Fri, 19 Jul 2019 21:21:22 +0000 (20 00:21 +0300)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 19 Jul 2019 21:21:22 +0000 (19 23:21 +0200)
tree8f124e50862368db6388166b6a03b33a32d1ec52
parentd159a38c478697072701d68bbdae57914d36dbb5
[netcore] Make System.Linq.Expressions.Tests.BindTests.GlobalField Pass (#15658)

`Expression.Bind` should throw `ArgumentException` if called with `FieldInfo` for a global field. The exception is thrown from validation of the (null) `DeclaringType` (see https://github.com/dotnet/corefx/pull/15318).
Mono returns `"<Module>"` in this case and doesn't throw so the test fails.

Fixes #14917 .
netcore/CoreFX.issues.rsp
netcore/System.Private.CoreLib/src/System.Reflection/RuntimeFieldInfo.cs