Update expectation for conditional expression and constant_update_2018.

R=brianwilkerson@google.com

Change-Id: Ie02053740ff3f643d93a754491e3727c246774b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2019-04-05 20:42:24 +00:00 committed by commit-bot@chromium.org
parent da4ccd0855
commit 4b9b8562c6

View file

@ -90,7 +90,11 @@ const c = true ? 1 : x;
'c',
errorCodes: [CompileTimeErrorCode.INVALID_CONSTANT],
);
expect(result, isNull);
if (analysisOptions.experimentStatus.constant_update_2018) {
expect(result.toIntValue(), 1);
} else {
expect(result, isNull);
}
}
test_visitConditionalExpression_eager_true_invalid_int() async {