How to reproduce:
1. Open the “Generic_Query_Bug” project
2. Open the “GenericQueryTest” script
3. Uncomment line 22 and save the script
4. Back in Editor observe the Console
Expected result: “GenericQueryTest” script compiles without any errors
Actual result: “GenericQueryTest” script throws “System.InvalidCastException” error
Reproduced with: 1.0.8 (2022.2.21f1, 2023.1.0b18, 2023.2.0a16)
Could not test with: 0.17.0-preview.41 (2022.2.21f1, 2023.1.0b18, 2023.2.0a16) (Package scripting errors), 0.17.0-preview.41 (2020.3.48f1, 2021.3.26f1), 1.0.8 (2020.3.48f1, 2021.3.26f1) (Package not supported)
Reproduced on: Windows 11
Full error log: