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

Side by Side Diff: compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java

Issue 8632020: Make method overrides with differing parameters a compile-time error (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes ClassOverrideNegativeTest Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 package com.google.dart.compiler.resolver; 4 package com.google.dart.compiler.resolver;
5 5
6 import com.google.dart.compiler.ErrorCode; 6 import com.google.dart.compiler.ErrorCode;
7 import com.google.dart.compiler.ErrorSeverity; 7 import com.google.dart.compiler.ErrorSeverity;
8 import com.google.dart.compiler.SubSystem; 8 import com.google.dart.compiler.SubSystem;
9 9
10 /** 10 /**
11 * {@link ErrorCode}s for resolver. 11 * {@link ErrorCode}s for resolver.
12 */ 12 */
13 public enum ResolverErrorCode implements ErrorCode { 13 public enum ResolverErrorCode implements ErrorCode {
14 CANNOT_ACCESS_OUTER_LABEL("Cannot access label %s declared in an outer functio n"), 14 CANNOT_ACCESS_OUTER_LABEL("Cannot access label %s declared in an outer functio n"),
15 CANNOT_ACCESS_FIELD_IN_INIT("Cannot access an instance field in an initializer expression"), 15 CANNOT_ACCESS_FIELD_IN_INIT("Cannot access an instance field in an initializer expression"),
16 CANNOT_ASSIGN_TO_FINAL("cannot assign value to final variable \"%s\"."), 16 CANNOT_ASSIGN_TO_FINAL("cannot assign value to final variable \"%s\"."),
17 CANNOT_BE_RESOLVED("cannot resolve %s"), 17 CANNOT_BE_RESOLVED("cannot resolve %s"),
18 CANNOT_BE_RESOLVED_LIBRARY("cannot resolve %s in library %s"), 18 CANNOT_BE_RESOLVED_LIBRARY("cannot resolve %s in library %s"),
19 CANNOT_BE_INITIALIZED("cannot be initialized"), 19 CANNOT_BE_INITIALIZED("cannot be initialized"),
20 CANNOT_CALL_LABEL("Labels cannot be called"), 20 CANNOT_CALL_LABEL("Labels cannot be called"),
21 CANNOT_DECLARE_NON_FACTORY_CONSTRUCTOR( 21 CANNOT_DECLARE_NON_FACTORY_CONSTRUCTOR(
22 "Cannot declare a non-factory named constructor of another class."), 22 "Cannot declare a non-factory named constructor of another class."),
23 CANNOT_INIT_FIELD_FROM_SUPERCLASS("Cannot initialize a field from a super clas s"), 23 CANNOT_INIT_FIELD_FROM_SUPERCLASS("Cannot initialize a field from a super clas s"),
24 CANNOT_INIT_STATIC_FIELD_IN_INITIALIZER("Cannot initialize a static field in a n initializer list"), 24 CANNOT_INIT_STATIC_FIELD_IN_INITIALIZER("Cannot initialize a static field in a n initializer list"),
25 CANNOT_OVERRIDE_INSTANCE_MEMBER("static member cannot override instance member %s of %s"), 25 CANNOT_OVERRIDE_INSTANCE_MEMBER("static member cannot override instance member %s of %s"),
26 CANNOT_OVERRIDE_STATIC_MEMBER("cannot override static member %s of %s"), 26 CANNOT_OVERRIDE_STATIC_MEMBER("cannot override static member %s of %s"),
27 CANNOT_OVERRIDE_METHOD_WRONG_NUM_PARAMS(
28 "cannot override method %s, wrong number of parameters"),
29 CANNOT_OVERRIDE_METHOD_NUM_NAMED_PARAMS(
scheglov 2011/12/09 16:49:52 Formatting (indentation)
30 "cannot override method %s, number of named parameters doesn't match") ,
31 CANNOT_OVERRIDE_METHOD_ORDER_NAMED_PARAMS(
32 "cannot override method %s, order of named parameters doesn't match"),
27 CANNOT_RESOLVE_CONSTRUCTOR("cannot resolve constructor %s"), 33 CANNOT_RESOLVE_CONSTRUCTOR("cannot resolve constructor %s"),
28 CANNOT_RESOLVE_FIELD("cannot resolve field %s"), 34 CANNOT_RESOLVE_FIELD("cannot resolve field %s"),
29 CANNOT_RESOLVE_LABEL("cannot resolve label %s"), 35 CANNOT_RESOLVE_LABEL("cannot resolve label %s"),
30 CANNOT_RESOLVE_METHOD("cannot resolve method %s"), 36 CANNOT_RESOLVE_METHOD("cannot resolve method %s"),
31 CANNOT_RESOLVE_SUPER_CONSTRUCTOR("cannot resolve method %s"), 37 CANNOT_RESOLVE_SUPER_CONSTRUCTOR("cannot resolve method %s"),
32 CANNOT_RESOLVE_IMPLICIT_CALL_TO_SUPER_CONSTRUCTOR( 38 CANNOT_RESOLVE_IMPLICIT_CALL_TO_SUPER_CONSTRUCTOR(
33 "super type %s does not have a default constructor"), 39 "super type %s does not have a default constructor"),
34 CIRCULAR_REFERENCE( 40 CIRCULAR_REFERENCE(
35 "Circular reference detected: compile-time constants cannot reference the mselves."), 41 "Circular reference detected: compile-time constants cannot reference the mselves."),
36 CONSTRUCTOR_CANNOT_BE_ABSTRACT("A constructor cannot be asbstract"), 42 CONSTRUCTOR_CANNOT_BE_ABSTRACT("A constructor cannot be asbstract"),
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 @Override 146 @Override
141 public ErrorSeverity getErrorSeverity() { 147 public ErrorSeverity getErrorSeverity() {
142 return severity; 148 return severity;
143 } 149 }
144 150
145 @Override 151 @Override
146 public SubSystem getSubSystem() { 152 public SubSystem getSubSystem() {
147 return SubSystem.RESOLVER; 153 return SubSystem.RESOLVER;
148 } 154 }
149 } 155 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698