Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: pkg/compiler/lib/src/resolution/resolution_common.dart

Issue 2567133002: Add support for the new function-type syntax. (Closed)
Patch Set: Fixes after rebase. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/resolution/resolution_common.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution_common.dart b/pkg/compiler/lib/src/resolution/resolution_common.dart
index 53d3c69b7cf3d3fb9d729f5b228d368fd2740db2..837906c7ac5b1eca814bac706fa7f616444fb518 100644
--- a/pkg/compiler/lib/src/resolution/resolution_common.dart
+++ b/pkg/compiler/lib/src/resolution/resolution_common.dart
@@ -56,6 +56,10 @@ abstract class MappingVisitor<T> extends CommonResolverVisitor<T> {
/// Add [element] to the current scope and check for duplicate definitions.
void addToScope(Element element) {
+ if (element is FormalElement && element.isUnnamed) {
+ // No duplicate names possible.
+ return;
+ }
Element existing = scope.add(element);
if (existing != element) {
reportDuplicateDefinition(element.name, element, existing);

Powered by Google App Engine
This is Rietveld 408576698