Search Issue Tracker
Fixed
Fixed in 1.8.17, 2.0.0-pre.18
Votes
0
Found in [Package]
1.8.14
Issue ID
BUR-2661
Regression
No
255 is returned when setting an enum variable to 1 and casting it to a negative integer
How to reproduce:
1. Open the attached “BurstBug.zip“ project
2. Open the “Assets/Scenes/SampleScene.unity“ Scene
3. Enter Play Mode
Expected result: “Result 1: -1; Result 2: -1; Result 3: -1“ is logged twice
Actual result: “Result 1: 255; Result 2: 255; Result 3: -1“ and “Result 1: -1; Result 2: -1; Result 3: -1“ is logged
Reproducible with: 1.4.0, 1.5.1 (2021.3.35f1), 2.4.0-pre.2 (2022.3.20f1, 2023.2.12f1, 2023.3.0b9)
Reproducible on: macOS 14.2.1 Sonoma (Intel)
Not reproducible on: No other environment tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
- Hidden GameObjects won't re-enable when they have call "DontDestroyOnLoad" function
- Overlay Canvas are rendered on each split-screen camera when HDR is enabled
- [Android] The Player loses focus when using UnityEngine.Handheld.StartActivityIndicator() with Facebook SDK
- Build fails with "Building Library/Bee/artifacts/MacStandalonePlayerBuildProgram/gahcy/hj9mx3z/951.0 failed with output:..." errors when Scripting Backend is set to IL2CPP
Resolution Note (fix version 2.0.0-pre.18):
Negation of enum values now correctly promotes from the underlying type.
Resolution Note (fix version 1.8.17):
Enums where not correctly promoted before a negate instruction, burst now correctly promotes a byte (and other types) enum to int as per spec.