Adding Interface to UserWidget fails casting

I’m trying to add an Interface into my custom UserWidget, but when I try casting it to have access it returns null.

BUT when I call DoesImplementInterface it returns true…

Btw, the interfaces are added through Blueprint, not hardcoded in c++

My code:

for (int32 i = 0 ; i < ListOfTargetWidgets.Num() ; i++) //ListOfTargetWidgets is TArray<FName>
{
	USFLobbyWidget* Widget = CastedHUD->FindLobbyWidget(ListOfTargetWidgets[i]);
	if (Widget != nullptr)
	{
		GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::White, "TargetWidget: " + ListOfTargetWidgets[i].ToString());
	bool b = UKismetSystemLibrary::DoesImplementInterface(Widget, UMainLobbyEvents::StaticClass());
		if (b)
		{
			GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::White, "Implements");
		}
		else
		{
			GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::White, "Does not implement");
		}
		IMainLobbyEvents* Interface = Cast<IMainLobbyEvents>(Widget);
		if (Interface)
		{
			GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::White, "InterfaceFound ");
            }
	}
	else
	{
		GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::White, "Cast failed");
	}

It actually prints “Implements” and “Cast Failed”

Might it be that I’m trying to add and ActorInterface into an UObject? If so, you should not be able to add via Blueprints in Class Settings,

Well, found out the problem. Adding the Interface to a Widget through the editor will not work, but including it via c++ works.

So… I think I found a bug. Gotta report it.

Reported