mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:21:07 +00:00
[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:
parent
873cc9a787
commit
fd38424fa4
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue