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

Side by Side Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 2643693002: Fix language/bad_constructor_test in dartk and analyzer. (Closed)
Patch Set: Remove extra blank line Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/compile_time_error_code_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.generated.error_verifier; 5 library analyzer.src.generated.error_verifier;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import "dart:math" as math; 8 import "dart:math" as math;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 2688 matching lines...) Expand 10 before | Expand all | Expand 10 after
2699 constructor, 2699 constructor,
2700 [name]); 2700 [name]);
2701 } 2701 }
2702 return; 2702 return;
2703 } 2703 }
2704 } 2704 }
2705 // conflict with class member 2705 // conflict with class member
2706 if (constructorName != null && 2706 if (constructorName != null &&
2707 constructorElement != null && 2707 constructorElement != null &&
2708 !constructorName.isSynthetic) { 2708 !constructorName.isSynthetic) {
2709 if (classElement.getField(name) != null) { 2709 FieldElement field = classElement.getField(name);
2710 // fields 2710 if (field != null && field.getter != null) {
2711 _errorReporter.reportErrorForNode( 2711 _errorReporter.reportErrorForNode(
2712 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, 2712 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD,
2713 constructor, 2713 constructor,
2714 [name]); 2714 [name]);
2715 } else if (classElement.getMethod(name) != null) { 2715 } else if (classElement.getMethod(name) != null) {
2716 // methods 2716 // methods
2717 _errorReporter.reportErrorForNode( 2717 _errorReporter.reportErrorForNode(
2718 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, 2718 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD,
2719 constructor, 2719 constructor,
2720 [name]); 2720 [name]);
(...skipping 4285 matching lines...) Expand 10 before | Expand all | Expand 10 after
7006 class _InvocationCollector extends RecursiveAstVisitor { 7006 class _InvocationCollector extends RecursiveAstVisitor {
7007 final List<String> superCalls = <String>[]; 7007 final List<String> superCalls = <String>[];
7008 7008
7009 @override 7009 @override
7010 visitMethodInvocation(MethodInvocation node) { 7010 visitMethodInvocation(MethodInvocation node) {
7011 if (node.target is SuperExpression) { 7011 if (node.target is SuperExpression) {
7012 superCalls.add(node.methodName.name); 7012 superCalls.add(node.methodName.name);
7013 } 7013 }
7014 } 7014 }
7015 } 7015 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/compile_time_error_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698