Description

Having an extra semicolon on the line before declaring a UPROPERTY will cause UHT to miss parsing the following UPROPERTY. This is expected, but an error is usually given when this is the case. This error is not thrown when the declaration happens in a USTRUCT however although the missing UPROPERTY problem still occurs.

Regression?: No
This happened in 4.11.2 and 4.12.5 as well

Steps to Reproduce
  1. Create a new C++ class in any project
  2. Outside of the class declaration in the .h file, add the following code:
USTRUCT()
struct FMyStruct
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyStruct")
		int32 MyInt = 10;;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyStruct")
		int32 MyOtherInt = 20;
};

3. Compile the code
Result: The code compiles successfully, resulting in the second UPROPERTY not being picked up by UHT due to the error that should've been caught
Expected: The compile should fail, giving an error letting the user know that the extra semicolon will block UHT from seeing the second UPROPERTY

Have Comments or More Details?

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

0
Login to Vote

Fixed
ComponentUE - Foundation - Core
Affects Versions4.12.54.134.144.15
Target Fix4.16
Fix Commit3392487
Main Commit3427032
Release Commit3392487
CreatedOct 26, 2016
ResolvedApr 13, 2017
UpdatedMay 6, 2017