I think this is the same issue as CSHARP-1714.
However, I cannot use the "is" clause workaround because I have a set of Type variables that I'm using to build up a dynamic LINQ query, so I can't use the "is" clause, which requires a constant expression.
Is there now a way to make the following work with MongoDB?
Type type1 = typeof(MyObject1);
Type type2 = typeof(MyObject2);
query.Where( c => c.GetType() == type1 || c => c.GetType() == type2);
I've manually verified that using an "is" clause does work on the same query.