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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java

Issue 10873088: Issue 3989. Show warning if constructor name is same as member name (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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: compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java b/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
index 6cf2abeb5e816a4fe809cbd87aa1be6f2d46bfe3..fcc7c90b7d988c878159a67755f529da20381e0a 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
@@ -147,6 +147,9 @@ public enum ResolverErrorCode implements ErrorCode {
MAP_LITERAL_ELEMENT_TYPE(
"Map literal element type must match declaration '%s' when type checks are on."),
MEMBER_WITH_NAME_OF_CLASS("Class member should not have the same name as the enclosing class"),
+ CONSTRUCTOR_WITH_NAME_OF_MEMBER(
+ ErrorSeverity.WARNING,
+ "Constructor cannot have the same name as the name of a member declared in the enclosing class"),
METHOD_MUST_HAVE_BODY("A non-abstract method must have a body"),
NAMED_PARAMETERS_CANNOT_START_WITH_UNDER("Named parameters cannot start with an '_' character"),
NEW_EXPRESSION_CANT_USE_TYPE_VAR("New expression cannot be invoked on type variable"),

Powered by Google App Engine
This is Rietveld 408576698