It seems I have messed up the compiler somehow, probably because I moved the project folder to another place.
I can’t compile the following code any more:
I have now found out, what caused the confusing compiler error.
I pasted accidentally some characters before the first precompiled #include line in one of my cpp (!) files.
While parsing the headers at start of the build, the related “MyFile.generated.h” file was not correctly updated, which caused also problems with the CLASS() keyword, as soon as I removed the ENUM for testing purposes.
I had to find out this the hard way. I wonder if the unreal build system could output a better error description in this case