Skip to content

Commit 34e4a6d

Browse files
jensjohacommit-bot@chromium.org
authored andcommitted
[CFE] Remove inconsistency where visitIsExpression called .accept directly
Change-Id: I81d0e99e6908f24d082cfa57454db8fdc3b333be Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166625 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
1 parent 87dd7c0 commit 34e4a6d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,9 +2361,7 @@ class ConstantEvaluator extends RecursiveVisitor<Constant> {
23612361

23622362
@override
23632363
Constant visitIsExpression(IsExpression node) {
2364-
// TODO(jensj): Why does this call .accept directly?
2365-
// (@askesc says it's probably an oversight)
2366-
final Constant constant = node.operand.accept(this);
2364+
final Constant constant = _evaluateSubexpression(node.operand);
23672365
if (constant is AbortConstant) return constant;
23682366
if (shouldBeUnevaluated) {
23692367
return unevaluated(

0 commit comments

Comments
 (0)