Compilation error in UMG after upgrading 4.1 project to 4.2

I’m seeing weird compilation errors after updating to Unreal Engine 4.2:

19>  UMGEditor.generated.cpp
19>  Module.UMG.cpp
19>  Module.UMGEditor.cpp
19>C:\Users\Neil\Prototype\PrototypeOC\UE4\Engine\Source\Runtime\UMG\Public\Blueprint\UserWidget.h(12): error C2039: 'show' : is not a member of 'AUserWidget'
19>          C:\Users\Neil\Prototype\PrototypeOC\UE4\Engine\Source\Runtime\UMG\Public\Blueprint\UserWidget.h(10) : see declaration of 'AUserWidget'
19>C:\Users\Neil\Prototype\PrototypeOC\UE4\Engine\Source\Runtime\UMG\Public\Blueprint\UserWidget.h(12): error C2039: 'show' : is not a member of 'AUserWidget'
19>          C:\Users\Neil\Prototype\PrototypeOC\UE4\Engine\Source\Runtime\UMG\Public\Blueprint\UserWidget.h(10) : see declaration of 'AUserWidget'

Here’s the reason I call it a “weird” error:

I generate the UE4.sln and build it using the “Development Editor” build config. I then get around to generating my project’s .sln file. Once I hit this error, if I go back to UE4 then I get EXACTLY THE SAME ERROR building UE4. So, at first guess, a file is being changed on disk somewhere!

Any ideas?

Well, if I change AUserWidget.h from

UCLASS(Abstract, hideCategories=(Object, Actor, Replication, Rendering, Input))
class UMG_API AUserWidget : public AActor
{
	GENERATED_UCLASS_BODY()

	UPROPERTY(EditDefaultsOnly, Category=Behavior)
	TEnumAsByte<ESlateVisibility::Type> Visiblity;

to

UCLASS(Abstract, hideCategories=(Object, Actor, Replication, Rendering, Input))
class UMG_API AUserWidget : public AActor
{
	GENERATED_UCLASS_BODY()

	void show();

	UPROPERTY(EditDefaultsOnly, Category=Behavior)
	TEnumAsByte<ESlateVisibility::Type> Visiblity;

…then it compiles. And then if I get rid of the void() declaration it… continues to build.

Clearly there is some voodoo occurring. :-/

Isn’t it?

I’m continuing to look into it - but it looks like it takes a rebuild for it to hit. It takes about 30 minutes to reproduce! :frowning:

That’s super weird, there is a Show function…but not a ‘show’ function.

Is Show a UFUNCTION? I wonder if it’s an issue with UHT and FName casing?