Commit 2f9d582
Fix: Incorrect casting when assigning Enum to custom type
- Modified TypeConversionAnalyzer.cs to use EnumCastThenConversion for all non-enum types, ensuring that the necessary cast through the underlying type is generated (e.g. `(MyType)(int)MyEnum.Value1`).
- Added unit test Issue1211_EnumToCustomTypeImplicitConversionAsync to ensure regressions don't occur.
Co-authored-by: GrahamTheCoder <2490482+GrahamTheCoder@users.noreply.github.com>1 parent f6326d0 commit 2f9d582
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments