How to reproduce:
1. Open “IN-93750_TestMonoScript“ project
2. Change the content of TestScript.cs to “enum Enum{}” and save
3. Right-click on the Script in the project window and select “Test MonoScript”
4. Observe Console
Expected result: MonoScript.GetClass() method returns null and an Error is displayed
Actual result: MonoScript.GetClass() returns type: Enum
Reproducible with: 2022.2.9f1, 2022.3.57f1
Not reproducible with: 2022.2.8f1, 6000.0.36f1, 6000.1.0b4, 6000.2.0a1
Could not test with: 2021.3.48f1 (GetClass() returns null for “class Enum{}”)
Reproducible on: macOS 15.2 (M1 Max)
Not reproducible on: no other environments tested
Note: this reproduces when the Script previously had any class or struct that passes the GetClass() method as not null.