Attempting to pass a TMap or TSet into a UFUNCTION as a parameter causes a compilation error. Removing the UFUNCTION declaration works.
Error messages:
2>D:\Unreal Projects\Main\MyProject14\Source\MyProject14\MyActor.h(11): error C2275: 'FName': illegal use of this type as an expression 2> d:\matthew.clark_main_stream\engine\source\runtime\core\public\UObject/NameTypes.h(522): note: see declaration of 'FName' 2>D:\Unreal Projects\Main\MyProject14\Source\MyProject14\MyActor.h(11): error C2275: 'FString': illegal use of this type as an expression 2> d:\matthew.clark_main_stream\engine\source\runtime\core\public\GenericPlatform/GenericPlatformSplash.h(34): note: see declaration of 'FString' 2>D:\Unreal Projects\Main\MyProject14\Source\MyProject14\MyActor.h(11): error C2065: 'Z_Param_Out_Test': undeclared identifier 2>D:\Unreal Projects\Main\MyProject14\Source\MyProject14\MyActor.h(11): error C3861: 'P_GET_TMAP_REF': identifier not found 2>d:\unreal projects\main\myproject14\source\myproject14\MyActor.h(11): error C2275: 'FName': illegal use of this type as an expression 2> d:\matthew.clark_main_stream\engine\source\runtime\core\public\UObject/NameTypes.h(522): note: see declaration of 'FName' 2>d:\unreal projects\main\myproject14\source\myproject14\MyActor.h(11): error C2275: 'FString': illegal use of this type as an expression 2> d:\matthew.clark_main_stream\engine\source\runtime\core\public\GenericPlatform/GenericPlatformSplash.h(34): note: see declaration of 'FString' 2>d:\unreal projects\main\myproject14\source\myproject14\MyActor.h(11): error C2065: 'Z_Param_Out_Test': undeclared identifier 2>d:\unreal projects\main\myproject14\source\myproject14\MyActor.h(11): error C3861: 'P_GET_TMAP_REF': identifier not found
Regression?: No
This also occurred in 4.14
UFUNCTION()
void TestFunction(TMap<FName, FString>& Test) {}
Result: The compilation fails with the errors listed in the description
Expected: The compilation succeeds
Head over to the existing Questions & Answers thread and let us know what's up.
| 31 |
| Component | UE - Foundation - Core |
|---|---|
| Affects Versions | 4.14, 4.15, 4.16 |
| Target Fix | 4.17 |
| Fix Commit | 3473722 |
|---|---|
| Main Commit | 3492074 |
| Created | Mar 2, 2017 |
|---|---|
| Resolved | Jun 5, 2017 |
| Updated | Apr 27, 2018 |
| 3444 - projectgheist |