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

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 637303005: Type check constant variable declarations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.error; 8 library engine.error;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i> 449 * argument <i>e<sub>i</sub></i><i>, 1 &lt;= i &lt;= n</i>
450 * 450 *
451 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of 451 * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static type of
452 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;= 452 * <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of <i>p<sub>i</s ub>, 1 &lt;= i &lt;=
453 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i> q</i> of <i>f</i>. 453 * n+k</i> and let <i>S<sub>q</sub></i> be the type of the named parameter <i> q</i> of <i>f</i>.
454 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;= 454 * It is a static warning if <i>T<sub>j</sub></i> may not be assigned to <i>S< sub>j</sub>, 1 &lt;=
455 * j &lt;= m</i>. 455 * j &lt;= m</i>.
456 */ 456 */
457 static const CheckedModeCompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = c onst CheckedModeCompileTimeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 4, "T he element type '{0}' cannot be assigned to the map value type '{1}'"); 457 static const CheckedModeCompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = c onst CheckedModeCompileTimeErrorCode.con1('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 4, "T he element type '{0}' cannot be assigned to the map value type '{1}'");
458 458
459 /**
460 * 12.11.2 Const: It is a compile-time error if evaluation of a constant objec t results in an
461 * uncaught exception being thrown.
462 */
463 static const CheckedModeCompileTimeErrorCode VARIABLE_TYPE_MISMATCH =
464 const CheckedModeCompileTimeErrorCode.con1(
465 'VARIABLE_TYPE_MISMATCH',
466 5,
467 "The object type '{0}' cannot be assigned to a variable of type '{1}'" );
Brian Wilkerson 2014/10/10 21:23:45 "variable" --> "const variable"? It might be more
Paul Berry 2014/10/10 21:56:38 Good point. I've added a TODO comment for now. I
468
459 static const List<CheckedModeCompileTimeErrorCode> values = const [ 469 static const List<CheckedModeCompileTimeErrorCode> values = const [
460 CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, 470 CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
461 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, 471 CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
462 LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, 472 LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
463 MAP_KEY_TYPE_NOT_ASSIGNABLE, 473 MAP_KEY_TYPE_NOT_ASSIGNABLE,
464 MAP_VALUE_TYPE_NOT_ASSIGNABLE]; 474 MAP_VALUE_TYPE_NOT_ASSIGNABLE,
475 VARIABLE_TYPE_MISMATCH];
465 476
466 /** 477 /**
467 * The template used to create the message to be displayed for this error. 478 * The template used to create the message to be displayed for this error.
468 */ 479 */
469 final String message; 480 final String message;
470 481
471 /** 482 /**
472 * The template used to create the correction to be displayed for this error, or `null` if 483 * The template used to create the correction to be displayed for this error, or `null` if
473 * there is no correction information for this error. 484 * there is no correction information for this error.
474 */ 485 */
(...skipping 3708 matching lines...) Expand 10 before | Expand all | Expand 10 after
4183 4194
4184 @override 4195 @override
4185 String get message => "{0}"; 4196 String get message => "{0}";
4186 4197
4187 @override 4198 @override
4188 ErrorType get type => ErrorType.TODO; 4199 ErrorType get type => ErrorType.TODO;
4189 4200
4190 @override 4201 @override
4191 String get uniqueName => "${runtimeType.toString()}.${name}"; 4202 String get uniqueName => "${runtimeType.toString()}.${name}";
4192 } 4203 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/constant.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698