I have

// Queries the database 
static auto Query(T...)(T query)
{ 		
	static if (T.length == 0)
	{
		auto lst = _collection.find!(typeof(this))();
		return lst;
	}
	else static if (T.length == 1)
	{
		auto lst = _collection.find!(typeof(this))(query);
		return lst;
	}
		
	pragma(msg, typeof(return));
}

Calling with no query works fine and I can iterate over the result with a foreach loop. When I try to pass a query string like ["Name":"Johnson"] I get a compile time error.

The return types are,

MongoCursor!(Bson, cProduct, typeof(null))

MongoCursor!(string[string], User, typeof(null))

respectively.

Error 42: Symbol Undefined D4vibe2db5mongo6cursor73T15MongoCursorDataTS4vibe4data4bson4BsonTC3dev6source5users4UserTnZ15MongoCursorData7_ClassZ

Any idea what could be going on?