[dartdevc] Immediately throw when encountering an unevaluated constant

Visiting an `UnevaluatedConstant` at this point is a signal something
has gone wrong in the constant evaluation. This should help us identify
hidden issues when flipping the constants-update-2018 flag back on.

Change-Id: Idd8db4c60785f00b22c29292db53783582ed8af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109104
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
Nicholas Shahan 2019-07-18 17:32:00 +00:00 committed by commit-bot@chromium.org
parent 873cc9a787
commit fd38424fa4

View file

@ -5376,7 +5376,7 @@ class ProgramCompiler extends Object
@override
js_ast.Expression visitUnevaluatedConstant(UnevaluatedConstant node) =>
_visitExpression(node.expression);
throw UnsupportedError('Encountered an unevaluated constant: $node');
}
bool _isInlineJSFunction(Statement body) {