Description
Version Used:
- '4.14.0-3.25279.5 (995f12b)'. Language version: preview.
- Latest IntPreview as well (not sharing version number here)
Steps to Reproduce:
class C
{
public static readonly uint Foo = Bar ? (uint)Flag : 0;
private static bool Bar => true;
private const int Flag = 1;
}
Diagnostic Id: IDE0004
If this is a report about a bug in an analyzer, please include the diagnostic ID and message if possible (e.g. "IDE0030: Use coalesce expression"
).
Expected Behavior:
No warning. The cast is needed.
Actual Behavior:
IDE0004 warning on the cast. If you apply the fix to remove it, the code fails to compile:
Metadata
Metadata
Assignees
Type
Projects
Status
Completed