We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75cc02a commit e772966Copy full SHA for e772966
src/Nest/CommonAbstractions/Infer/Field/FieldExpressionVisitor.cs
@@ -14,7 +14,13 @@ namespace Nest
14
{
15
internal class HasConstantExpressionVisitor : ExpressionVisitor
16
17
- public bool Found { get; private set; }
+ private bool _found;
18
+ public bool Found
19
+ {
20
+ get { return _found; }
21
+ // This is only set to true once to prevent clobbering from subsequent node visits
22
+ private set { if (!_found) _found = value; }
23
+ }
24
25
public HasConstantExpressionVisitor(Expression e)
26
@@ -23,7 +29,7 @@ public HasConstantExpressionVisitor(Expression e)
29
30
public override Expression Visit(Expression node)
31
- if (!Found)
32
+ if (!this.Found)
27
33
return base.Visit(node);
28
34
return node;
35
}
0 commit comments