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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 11453009: Report a compile-time error when a setter has not exactly one formal parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 4
5 part of dart2js; 5 part of dart2js;
6 6
7 class MessageKind { 7 class MessageKind {
8 final String template; 8 final String template;
9 const MessageKind(this.template); 9 const MessageKind(this.template);
10 10
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 static const MISSING_ARGUMENTS_TO_ASSERT = const MessageKind( 213 static const MISSING_ARGUMENTS_TO_ASSERT = const MessageKind(
214 "missing arguments to assert"); 214 "missing arguments to assert");
215 215
216 static const GETTER_MISMATCH = const MessageKind( 216 static const GETTER_MISMATCH = const MessageKind(
217 "Error: setter disagrees on: #{1}."); 217 "Error: setter disagrees on: #{1}.");
218 218
219 static const SETTER_MISMATCH = const MessageKind( 219 static const SETTER_MISMATCH = const MessageKind(
220 "Error: getter disagrees on: #{1}."); 220 "Error: getter disagrees on: #{1}.");
221 221
222 static const ILLEGAL_SETTER_FORMALS = const MessageKind(
223 "Error: a setter must have exactly one argument.");
224
222 static const NO_STATIC_OVERRIDE = const MessageKind( 225 static const NO_STATIC_OVERRIDE = const MessageKind(
223 "Error: static member cannot override instance member '#{1}' of '#{2}'."); 226 "Error: static member cannot override instance member '#{1}' of '#{2}'.");
224 227
225 static const NO_STATIC_OVERRIDE_CONT = const MessageKind( 228 static const NO_STATIC_OVERRIDE_CONT = const MessageKind(
226 "Info: this is the instance member that cannot be overridden " 229 "Info: this is the instance member that cannot be overridden "
227 "by a static member."); 230 "by a static member.");
228 231
229 static const CANNOT_OVERRIDE_FIELD_WITH_METHOD = const MessageKind( 232 static const CANNOT_OVERRIDE_FIELD_WITH_METHOD = const MessageKind(
230 "Error: method cannot override field '#{1}' of '#{2}'."); 233 "Error: method cannot override field '#{1}' of '#{2}'.");
231 234
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 435
433 class CompileTimeConstantError extends Diagnostic { 436 class CompileTimeConstantError extends Diagnostic {
434 CompileTimeConstantError(MessageKind kind, List arguments) 437 CompileTimeConstantError(MessageKind kind, List arguments)
435 : super(kind, arguments); 438 : super(kind, arguments);
436 } 439 }
437 440
438 class CompilationError extends Diagnostic { 441 class CompilationError extends Diagnostic {
439 CompilationError(MessageKind kind, List arguments) 442 CompilationError(MessageKind kind, List arguments)
440 : super(kind, arguments); 443 : super(kind, arguments);
441 } 444 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698