Skip to content

Commit

Permalink
Throw a proper error when the same built-in module is @used twice (#1070
Browse files Browse the repository at this point in the history
)

Closes #1047
  • Loading branch information
nex3 committed Sep 4, 2020
1 parent 1dff9a7 commit a062954
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,8 @@

* Improve some error messages for edge-case parse failures.

* Throw a proper error when the same built-in module is `@use`d twice.

* Don't crash when writing `Infinity` in JS mode.

## 1.26.10
Expand Down
2 changes: 1 addition & 1 deletion lib/src/visitor/async_evaluate.dart
Expand Up @@ -549,7 +549,7 @@ class _EvaluateVisitor
nodeWithSpan.span);
}

callback(builtInModule);
_addExceptionSpan(nodeWithSpan, () => callback(builtInModule));
return;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/src/visitor/evaluate.dart
Expand Up @@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_evaluate.dart.
// See tool/grind/synchronize.dart for details.
//
// Checksum: 7f6c1eeddc48b08b4ff3f95c3af19cdf8afdfb1b
// Checksum: f6fe6645ccec58216ef623851bd2594de291a360
//
// ignore_for_file: unused_import

Expand Down Expand Up @@ -552,7 +552,7 @@ class _EvaluateVisitor
nodeWithSpan.span);
}

callback(builtInModule);
_addExceptionSpan(nodeWithSpan, () => callback(builtInModule));
return;
}

Expand Down

0 comments on commit a062954

Please sign in to comment.