Skip to content

Invalid ternary operation code generated #22

@MaceWindu

Description

@MaceWindu
        public enum Test
        {
            One,
            Two
        }

Expression<Func<bool, bool>> expr = flag => (flag ? Test.One : Test.Two) == Test.Two;

Expected:

flag => (flag ? Test.One : Test.Two) == Test.Two
or 
flag => (int)(flag ? Test.One : Test.Two) == 1

Actual:

flag => ((int)flag ? Test.One : Test.Two) == 1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions