How can a forward declaration cause "undefined"

Removing the nullptr did not fix it. Also it is spelled correctly.

This code worked fine until I added another property to it:

UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "BaseStructure|Components")
UBoxComponent* RootCollisionComp;

And ever since I have this problem. Outcommenting the property also does not fix it and even when I ctrl+z it back to the original state the c++ used to be last time it compiled it still throws this error. So weird.

So I added it to the header file but kept the “class” keyword and now it compiles:

#include "Structures/Ghosts/BasePlacementGhost.h"

I’m pretty sure now that this is a bug but reporting such a hard to reproduce bug probably won’t do much. It very much looks like the forward declaration being bugged. But it is reproducible 100% of the time in my project it seems :confused:

I also noticed the compiler having some problems with it. Compiling the class that inherits this class t akes about 30 seconds for ONE tiny class. Really odd.