Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Constant boolean within a subexpression fails with InvalidOperation #66

Description

@damieng

Both of these expressions fail with an InvalidOperation error:

var orTrueSub = Robots.Where(r => r.Id == 11 && (true || r.EnergyUse > 2));
var andFalseSub = Robots.Where(r => r.Id == 11 || (false && r.EnergyUse > 2));

This is because the sub-expressions resolve to constant expressions but the removal of constant expressions is done before the sub-expression is resolved within ConstantQueryFilterReducer.cs

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions