Xcode Version 15.4 (15F31d) is consistently changing "class" and "struct" to "enum"

While coding, Xcode Version 15.4 (15F31d) is consistently breaking builds by changing both struct and class declarations in areas of code other than where I'm currently editing. Suddenly, code that was compiling a minute ago breaks with multiple "Type 'Xxxx' has no member 'getYyyy'.

For example, I'm writing code in a subclass, and suddenly calls to the superclass's methods are unrecognized by the compiler (e.g., "Type 'MeetInfoSheetReader' has no member 'getDateValue'").

Command-click on the method name takes me to the method in the superclass, and nothing is wrong at that point: I have the correct method signature, yet the code doesn't compile. I scroll up to the class declaration only to find that Xcode has changed "class" to "enum".

This can happen regardless of whether the superclass or the reference struct is in the same or a different file.

Also, this happens frequently, and it's not because I have bouts of narcolepsy and changed class or struct to enum while out. My dog doesn't even get near the laptop while I'm away from it, and I don't have a cat who types let alone a cat.

Because I cannot associate this aggravating Xcode behavior with any particular thing I'm doing (e.g., name refactoring a variable or class name, deleting commented sections of exploratory code, or anything else) I'm sure that if I file a bug with the Feedback Assistant (a really ****** bug reporting system), it will be marked closed without the slightest bit of interest in exploring the problem.

Hopefully someone else has seen this behavior and has a solution. Because it's really counterproductive.

Cat typing would have been a good explanation 🐱

More seriously. I have not met such issues recently.

But I remember, with older versions of Xcode to have faced issues with files that seemed to change in my back or not to take into account I had made.

If I remember correctly, it happened when I reopened a file through the "history" via tabs and not via the file list on the left pane. Then Xcode would reload an older version.

A solution is often to call Clean Build Folder in the Product menu.

Hope that helps.

You should file a bug report, with a video to show the behavior.

Xcode Version 15.4 (15F31d) is consistently changing "class" and "struct" to "enum"
 
 
Q