History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-49309
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Olga Lobacheva
Reporter: Vladimir Reshetnikov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ReSharper

'checked' statements are not taken into account during constant expression evaluation

Created: 15 Sep 07 20:57   Updated: 03 Oct 07 17:48
Component/s: None
Fix Version/s: 3.1, 4.0
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 521


 Description  « Hide
class A
{
    static void Foo()
    {
        unchecked
        {
            checked
            {
                const byte x = (byte)-1; // error CS0221: Constant value '-1' cannot be converted to a 'byte' (use 'unchecked' syntax to override)
            }
        }
    }
}

I suppose, the problem in CSharpExpressionBase.IsCheckedContext



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.