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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 1b99f57aaca59e32d6d22f80900cde5fe13cba4e..d15dae76cdef88873906051bf13cbd5ee10f381b 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -2706,8 +2706,8 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
if (constructorName != null &&
constructorElement != null &&
!constructorName.isSynthetic) {
- if (classElement.getField(name) != null) {
- // fields
+ FieldElement field = classElement.getField(name);
+ if (field != null && field.getter != null) {
_errorReporter.reportErrorForNode(
CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD,
constructor,
« 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