Description

In 4.19, it is no longer possible to create a non-static custom thunk in a class. This was possible in 4.18.3.

REGRESSION:
Yes.

Steps to Reproduce
  1. Create a new Basic Code project.
  2. Add a new UActorComponent code class to the project.
  3. In the header file for the new UActorComponent class, add the following code:
    UPROPERTY(EditAnywhere, BlueprintReadWrite)
    TArray<FString> LineBuffer;
    
    UFUNCTION(BlueprintCallable, CustomThunk, Category = TestCat, meta = (CustomStructureParam = "AnyStruct"))
    void InitializeStruct(UProperty* AnyStruct);
    
    DECLARE_FUNCTION(execInitializeStruct)
    {
    	LineBuffer.Add(TEXT("This is a test."));
    }
  4. Build the project in Visual Studio.

RESULT:
The build fails with the following error: error C2228: left of '.Add' must have class/struct/union

EXPECTED:
The build completes successfully.

Have Comments or More Details?

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

0
Login to Vote

By Design
CreatedMay 7, 2018
ResolvedMay 8, 2018
UpdatedJul 14, 2021
View Jira Issue