Description

Followings are nodes in the repro project.

[Image Removed]

 

Here's a generated code of the BP

void ANewBlueprint_C__pf1010915279::bpf__NewFunction_0__pf()
{
	uint8 bpfv__CallFunc_GetInt_NewParam__pf{};
	uint8 bpfv__CallFunc_GetValidValue_ReturnValue__pf{};
	FName bpfv__CallFunc_Map_Find_Value__pf{};
	bool bpfv__CallFunc_Map_Find_ReturnValue__pf{};
	FString bpfv__CallFunc_Conv_NameToString_ReturnValue__pf{};
	bpf__GetInt__pf(/*out*/ bpfv__CallFunc_GetInt_NewParam__pf);
	bpfv__CallFunc_GetValidValue_ReturnValue__pf = UKismetNodeHelperLibrary::GetValidValue(CastChecked<UEnum>(CastChecked<UDynamicClass>(ANewBlueprint_C__pf1010915279::StaticClass())->UsedAssets[0], ECastCheckedType::NullAllowed), bpfv__CallFunc_GetInt_NewParam__pf);
	bpfv__CallFunc_Map_Find_ReturnValue__pf = FCustomThunkTemplates::Map_Find(bpv__NewVar_0__pf, bpfv__CallFunc_GetValidValue_ReturnValue__pf, /*out*/ bpfv__CallFunc_Map_Find_Value__pf);
	bpfv__CallFunc_Conv_NameToString_ReturnValue__pf = UKismetStringLibrary::Conv_NameToString(bpfv__CallFunc_Map_Find_Value__pf);
	UKismetSystemLibrary::PrintString(this, bpfv__CallFunc_Conv_NameToString_ReturnValue__pf, true, true, FLinearColor(0.000000,0.660000,1.000000,1.000000), 2.000000);
}

The second arguments in the FCustomThunkTemplates::Map_Find needs a casting to enum type from uint8.

 

 

Steps to Reproduce
  1. Open attached project on 4.25 [Link Removed]
  2. Compile project and launch
  3. Press File>PackageProject>Windows(64bit) on the menu

Result:

Packaging project failed with following error

E:\dev\UnrealEngine-4.25.3\Engine\Source\Runtime\Engine\Public\GeneratedCodeHelpers.h(435): error C2663: 'TMapBase<KeyType,ValueType,SetAllocator,KeyFuncs>::Find': 2 overloads have no legal conversion for 'this' pointer
        with
        [
            KeyType=ETestNativeEnum,
            ValueType=FName,
            SetAllocator=FDefaultSetAllocator,
            KeyFuncs=TDefaultMapHashableKeyFuncs<ETestNativeEnum,FName,false>
        ]
D:/dev/UE425projects/NatTestMapFind/Intermediate/Plugins/NativizedAssets/Windows/Game/Source/NativizedAssets/Private/NewBlueprint__pf1010915279.cpp(536): note: see reference to function template instantiation 'bool FCustomThunkTemplates::Map_Find<ETestNativeEnum,FName,uint8,FName>(const TMap<ETestNativeEnum,FName,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<KeyType,ValueType,false>> &,const V &,W &)' being compiled
        with
        [
            KeyType=ETestNativeEnum,
            ValueType=FName,
            V=uint8,
            W=FName
        ]

 

 

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-100431 in the post.

1
Login to Vote

Fixed
ComponentUE - Gameplay - Blueprint
Affects Versions4.25
Target Fix4.26
Fix Commit14219534
Main Commit14219534
CreatedOct 2, 2020
ResolvedOct 6, 2020
UpdatedApr 28, 2021