Description

Using all caps for the name of a struct defined in code that includes a constructor will cause the build of the project to fail in Visual Studio. The error that is given suggests that a semi-colon is missing, and points to the line where the struct's constructor is located.

This is possibly related to [Link Removed].

REGRESSION:
Yes. This would build without any problems in 4.14.3.

Steps to Reproduce
  1. Create a new basic code project.
  2. Add a new Actor class to the project.
  3. In the header file for the new actor class, add the following struct:
    USTRUCT(BlueprintType)
    struct FTESTSTRUCT
    {
    	GENERATED_USTRUCT_BODY()
    
    	FTESTSTRUCT() {}
    };
    
  4. Build the project in Visual Studio.

RESULT:
The build fails with the following error on the line of the struct's constructor: error : Unexpected '}'. Did you miss a semi-colon?

EXPECTED:
The build completes successfully.

WORKAROUND:
Do not use all caps in the name of the struct. If any letter in the struct's name is not capitalized, the project will build successfully. The build also completes successfully if no constructor is included in the struct.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
Fix Commit3604106
Main Commit3620189
Release Commit3643070
CreatedMay 11, 2017
ResolvedAug 30, 2017
UpdatedSep 26, 2017
View Jira Issue