C++ Error C2679: Binary '=': no operator found which takes right-hand operand of type 'TArray'

What fails exactly, casting something to IUnit, or assigning an IUnit* to the TSubclassOf< UObject >? Compile time or run time? And how is the IUnit class declared?