Skip to content

Unexpected type change when parsing addition of integer to enum #969

@glopesdev

Description

@glopesdev

Consider the following expression:

DayOfWeek.Monday + 1

Following #953 this expression now succeeds, but unexpectedly the type of the result is evaluated as int, rather than DayOfWeek.

Running the following expression in C# code (or C# interactive):

var day = DayOfWeek.Monday + 1

returns DayOfWeek as the type for variable day, rather than the integer backing type.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions