OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 PARAMETER_INIT_OUTSIDE_CONSTRUCTOR("Parameter initializers can only be used in
constructors"), | 169 PARAMETER_INIT_OUTSIDE_CONSTRUCTOR("Parameter initializers can only be used in
constructors"), |
170 SUPER_METHOD_INVOCATION_IN_CONSTRUCTOR_INITIALIZER( | 170 SUPER_METHOD_INVOCATION_IN_CONSTRUCTOR_INITIALIZER( |
171 "Super method invocation is not allowed in constructor initializer"), | 171 "Super method invocation is not allowed in constructor initializer"), |
172 PARAMETER_INIT_STATIC_FIELD( | 172 PARAMETER_INIT_STATIC_FIELD( |
173 "Parameter initializer cannot be use to initialize a static field '%s'"), | 173 "Parameter initializer cannot be use to initialize a static field '%s'"), |
174 // TODO(zundel): error message needs JUnit test (reachable code?) | 174 // TODO(zundel): error message needs JUnit test (reachable code?) |
175 PARAMETER_INIT_WITH_REDIR_CONSTRUCTOR( | 175 PARAMETER_INIT_WITH_REDIR_CONSTRUCTOR( |
176 "Parameter initializers cannot be used with redirected constructors"), | 176 "Parameter initializers cannot be used with redirected constructors"), |
177 // TODO(zundel): error message needs JUnit test | 177 // TODO(zundel): error message needs JUnit test |
178 PARAMETER_NOT_MATCH_FIELD("Could not match parameter initializer '%s' with any
field"), | 178 PARAMETER_NOT_MATCH_FIELD("Could not match parameter initializer '%s' with any
field"), |
| 179 REDIRECTION_CONSTRUCTOR_TARGET_MUST_BE_CONST( |
| 180 "Target of constant redirecting factory constructor also should be constan
t"), |
179 RETHROW_NOT_IN_CATCH("Re-throw not in a catch block"), | 181 RETHROW_NOT_IN_CATCH("Re-throw not in a catch block"), |
180 STATIC_FINAL_REQUIRES_VALUE("Static final fields must have an initial value"), | 182 STATIC_FINAL_REQUIRES_VALUE("Static final fields must have an initial value"), |
181 SUPER_IN_FACTORY_CONSTRUCTOR("Cannot use 'super' in a factory constructor"), | 183 SUPER_IN_FACTORY_CONSTRUCTOR("Cannot use 'super' in a factory constructor"), |
182 SUPER_IN_STATIC_METHOD("Cannot use 'super' in a static method"), | 184 SUPER_IN_STATIC_METHOD("Cannot use 'super' in a static method"), |
183 SUPER_OUTSIDE_OF_METHOD("Cannot use 'super' outside of a method"), | 185 SUPER_OUTSIDE_OF_METHOD("Cannot use 'super' outside of a method"), |
184 SUPER_ON_TOP_LEVEL("Cannot use 'super' in a top-level element"), | 186 SUPER_ON_TOP_LEVEL("Cannot use 'super' in a top-level element"), |
185 THIS_IN_STATIC_METHOD("Cannot use 'this' in a static method"), | 187 THIS_IN_STATIC_METHOD("Cannot use 'this' in a static method"), |
186 THIS_IN_INITIALIZER_AS_EXPRESSION("Cannot reference 'this' as expression in in
itializer list"), | 188 THIS_IN_INITIALIZER_AS_EXPRESSION("Cannot reference 'this' as expression in in
itializer list"), |
187 THIS_ON_TOP_LEVEL("Cannot use 'this' in a top-level element"), | 189 THIS_ON_TOP_LEVEL("Cannot use 'this' in a top-level element"), |
188 THIS_OUTSIDE_OF_METHOD("Cannot use 'this' outside of a method"), | 190 THIS_OUTSIDE_OF_METHOD("Cannot use 'this' outside of a method"), |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 @Override | 233 @Override |
232 public SubSystem getSubSystem() { | 234 public SubSystem getSubSystem() { |
233 return SubSystem.RESOLVER; | 235 return SubSystem.RESOLVER; |
234 } | 236 } |
235 | 237 |
236 @Override | 238 @Override |
237 public boolean needsRecompilation() { | 239 public boolean needsRecompilation() { |
238 return true; | 240 return true; |
239 } | 241 } |
240 } | 242 } |
OLD | NEW |