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

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

Issue 2108823002: fix #26122, classify strong mode errors correctly (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix expectations, remove unncessary code in CLI/server Created 4 years, 5 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
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 library analyzer.src.generated.error; 5 library analyzer.src.generated.error;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart' show AstNode; 9 import 'package:analyzer/dart/ast/ast.dart' show AstNode;
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 4908 matching lines...) Expand 10 before | Expand all | Expand 10 after
4919 /** 4919 /**
4920 * 5 Variables: It is a static warning if a library, static or local variable 4920 * 5 Variables: It is a static warning if a library, static or local variable
4921 * <i>v</i> is final and <i>v</i> is not initialized at its point of 4921 * <i>v</i> is final and <i>v</i> is not initialized at its point of
4922 * declaration. 4922 * declaration.
4923 * 4923 *
4924 * Parameters: 4924 * Parameters:
4925 * 0: the name of the uninitialized final variable 4925 * 0: the name of the uninitialized final variable
4926 */ 4926 */
4927 static const StaticWarningCode FINAL_NOT_INITIALIZED = 4927 static const StaticWarningCode FINAL_NOT_INITIALIZED =
4928 const StaticWarningCode('FINAL_NOT_INITIALIZED', 4928 const StaticWarningCode('FINAL_NOT_INITIALIZED',
4929 "The final variable '{0}' must be initialized"); 4929 "The final variable '{0}' must be initialized", null, false);
4930 4930
4931 /** 4931 /**
4932 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> 4932 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i>
4933 * declared in the immediately enclosing class must have an initializer in 4933 * declared in the immediately enclosing class must have an initializer in
4934 * <i>k</i>'s initializer list unless it has already been initialized by one 4934 * <i>k</i>'s initializer list unless it has already been initialized by one
4935 * of the following means: 4935 * of the following means:
4936 * * Initialization at the declaration of <i>f</i>. 4936 * * Initialization at the declaration of <i>f</i>.
4937 * * Initialization by means of an initializing formal of <i>k</i>. 4937 * * Initialization by means of an initializing formal of <i>k</i>.
4938 * or a static warning occurs. 4938 * or a static warning occurs.
4939 * 4939 *
4940 * Parameters: 4940 * Parameters:
4941 * 0: the name of the uninitialized final variable 4941 * 0: the name of the uninitialized final variable
4942 */ 4942 */
4943 static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 = 4943 static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 =
4944 const StaticWarningCode('FINAL_NOT_INITIALIZED_CONSTRUCTOR_1', 4944 const StaticWarningCode('FINAL_NOT_INITIALIZED_CONSTRUCTOR_1',
4945 "The final variable '{0}' must be initialized"); 4945 "The final variable '{0}' must be initialized", null, false);
4946 4946
4947 /** 4947 /**
4948 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> 4948 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i>
4949 * declared in the immediately enclosing class must have an initializer in 4949 * declared in the immediately enclosing class must have an initializer in
4950 * <i>k</i>'s initializer list unless it has already been initialized by one 4950 * <i>k</i>'s initializer list unless it has already been initialized by one
4951 * of the following means: 4951 * of the following means:
4952 * * Initialization at the declaration of <i>f</i>. 4952 * * Initialization at the declaration of <i>f</i>.
4953 * * Initialization by means of an initializing formal of <i>k</i>. 4953 * * Initialization by means of an initializing formal of <i>k</i>.
4954 * or a static warning occurs. 4954 * or a static warning occurs.
4955 * 4955 *
4956 * Parameters: 4956 * Parameters:
4957 * 0: the name of the uninitialized final variable 4957 * 0: the name of the uninitialized final variable
4958 * 1: the name of the uninitialized final variable 4958 * 1: the name of the uninitialized final variable
4959 */ 4959 */
4960 static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 = 4960 static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 =
4961 const StaticWarningCode('FINAL_NOT_INITIALIZED_CONSTRUCTOR_2', 4961 const StaticWarningCode(
4962 "The final variables '{0}' and '{1}' must be initialized"); 4962 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_2',
4963 "The final variables '{0}' and '{1}' must be initialized",
4964 null,
4965 false);
4963 4966
4964 /** 4967 /**
4965 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i> 4968 * 7.6.1 Generative Constructors: Each final instance variable <i>f</i>
4966 * declared in the immediately enclosing class must have an initializer in 4969 * declared in the immediately enclosing class must have an initializer in
4967 * <i>k</i>'s initializer list unless it has already been initialized by one 4970 * <i>k</i>'s initializer list unless it has already been initialized by one
4968 * of the following means: 4971 * of the following means:
4969 * * Initialization at the declaration of <i>f</i>. 4972 * * Initialization at the declaration of <i>f</i>.
4970 * * Initialization by means of an initializing formal of <i>k</i>. 4973 * * Initialization by means of an initializing formal of <i>k</i>.
4971 * or a static warning occurs. 4974 * or a static warning occurs.
4972 * 4975 *
4973 * Parameters: 4976 * Parameters:
4974 * 0: the name of the uninitialized final variable 4977 * 0: the name of the uninitialized final variable
4975 * 1: the name of the uninitialized final variable 4978 * 1: the name of the uninitialized final variable
4976 * 2: the number of additional not initialized variables that aren't listed 4979 * 2: the number of additional not initialized variables that aren't listed
4977 */ 4980 */
4978 static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS = 4981 static const StaticWarningCode FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS =
4979 const StaticWarningCode('FINAL_NOT_INITIALIZED_CONSTRUCTOR_3', 4982 const StaticWarningCode(
4980 "The final variables '{0}', '{1}' and '{2}' more must be initialized") ; 4983 'FINAL_NOT_INITIALIZED_CONSTRUCTOR_3',
4984 "The final variables '{0}', '{1}' and '{2}' more must be initialized",
4985 null,
4986 false);
4981 4987
4982 /** 4988 /**
4983 * 15.5 Function Types: It is a static warning if a concrete class implements 4989 * 15.5 Function Types: It is a static warning if a concrete class implements
4984 * Function and does not have a concrete method named call(). 4990 * Function and does not have a concrete method named call().
4985 */ 4991 */
4986 static const StaticWarningCode FUNCTION_WITHOUT_CALL = const StaticWarningCode ( 4992 static const StaticWarningCode FUNCTION_WITHOUT_CALL = const StaticWarningCode (
4987 'FUNCTION_WITHOUT_CALL', 4993 'FUNCTION_WITHOUT_CALL',
4988 "Concrete classes that implement Function must implement the method call() "); 4994 "Concrete classes that implement Function must implement the method call() ");
4989 4995
4990 /** 4996 /**
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
5291 static const StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE = 5297 static const StaticWarningCode MAP_VALUE_TYPE_NOT_ASSIGNABLE =
5292 const StaticWarningCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE', 5298 const StaticWarningCode('MAP_VALUE_TYPE_NOT_ASSIGNABLE',
5293 "The element type '{0}' cannot be assigned to the map value type '{1}' "); 5299 "The element type '{0}' cannot be assigned to the map value type '{1}' ");
5294 5300
5295 /** 5301 /**
5296 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> 5302 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
5297 * with argument type <i>T</i> and a getter named <i>v</i> with return type 5303 * with argument type <i>T</i> and a getter named <i>v</i> with return type
5298 * <i>S</i>, and <i>T</i> may not be assigned to <i>S</i>. 5304 * <i>S</i>, and <i>T</i> may not be assigned to <i>S</i>.
5299 */ 5305 */
5300 static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES = 5306 static const StaticWarningCode MISMATCHED_GETTER_AND_SETTER_TYPES =
5301 const StaticWarningCode('MISMATCHED_GETTER_AND_SETTER_TYPES', 5307 const StaticWarningCode(
5302 "The parameter type for setter '{0}' is '{1}' which is not assignable to its getter (of type '{2}')"); 5308 'MISMATCHED_GETTER_AND_SETTER_TYPES',
5309 "The parameter type for setter '{0}' is '{1}' which is not assignable to its getter (of type '{2}')",
5310 null,
5311 false);
5303 5312
5304 /** 5313 /**
5305 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i> 5314 * 7.3 Setters: It is a static warning if a class has a setter named <i>v=</i>
5306 * with argument type <i>T</i> and a getter named <i>v</i> with return type 5315 * with argument type <i>T</i> and a getter named <i>v</i> with return type
5307 * <i>S</i>, and <i>T</i> may not be assigned to <i>S</i>. 5316 * <i>S</i>, and <i>T</i> may not be assigned to <i>S</i>.
5308 */ 5317 */
5309 static const StaticWarningCode 5318 static const StaticWarningCode
5310 MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE = 5319 MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE =
5311 const StaticWarningCode( 5320 const StaticWarningCode(
5312 'MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE', 5321 'MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE',
5313 "The parameter type for setter '{0}' is '{1}' which is not assignable to its getter (of type '{2}'), from superclass '{3}'"); 5322 "The parameter type for setter '{0}' is '{1}' which is not assignable to its getter (of type '{2}'), from superclass '{3}'",
5323 null,
5324 false);
5314 5325
5315 /** 5326 /**
5316 * 13.12 Return: It is a static warning if a function contains both one or 5327 * 13.12 Return: It is a static warning if a function contains both one or
5317 * more return statements of the form <i>return;</i> and one or more return 5328 * more return statements of the form <i>return;</i> and one or more return
5318 * statements of the form <i>return e;</i>. 5329 * statements of the form <i>return e;</i>.
5319 */ 5330 */
5320 static const StaticWarningCode MIXED_RETURN_TYPES = const StaticWarningCode( 5331 static const StaticWarningCode MIXED_RETURN_TYPES = const StaticWarningCode(
5321 'MIXED_RETURN_TYPES', 5332 'MIXED_RETURN_TYPES',
5322 "Methods and functions cannot use return both with and without values"); 5333 "Methods and functions cannot use return both with and without values",
5334 null,
5335 false);
5323 5336
5324 /** 5337 /**
5325 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an 5338 * 12.11.1 New: It is a static warning if <i>q</i> is a constructor of an
5326 * abstract class and <i>q</i> is not a factory constructor. 5339 * abstract class and <i>q</i> is not a factory constructor.
5327 */ 5340 */
5328 static const StaticWarningCode NEW_WITH_ABSTRACT_CLASS = 5341 static const StaticWarningCode NEW_WITH_ABSTRACT_CLASS =
5329 const StaticWarningCode('NEW_WITH_ABSTRACT_CLASS', 5342 const StaticWarningCode('NEW_WITH_ABSTRACT_CLASS',
5330 "Abstract classes cannot be created with a 'new' expression"); 5343 "Abstract classes cannot be created with a 'new' expression");
5331 5344
5332 /** 5345 /**
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
5524 static const StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE = 5537 static const StaticWarningCode NON_TYPE_IN_CATCH_CLAUSE =
5525 const StaticWarningCode('NON_TYPE_IN_CATCH_CLAUSE', 5538 const StaticWarningCode('NON_TYPE_IN_CATCH_CLAUSE',
5526 "The name '{0}' is not a type and cannot be used in an on-catch clause "); 5539 "The name '{0}' is not a type and cannot be used in an on-catch clause ");
5527 5540
5528 /** 5541 /**
5529 * 7.1.1 Operators: It is a static warning if the return type of the 5542 * 7.1.1 Operators: It is a static warning if the return type of the
5530 * user-declared operator []= is explicitly declared and not void. 5543 * user-declared operator []= is explicitly declared and not void.
5531 */ 5544 */
5532 static const StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR = 5545 static const StaticWarningCode NON_VOID_RETURN_FOR_OPERATOR =
5533 const StaticWarningCode('NON_VOID_RETURN_FOR_OPERATOR', 5546 const StaticWarningCode('NON_VOID_RETURN_FOR_OPERATOR',
5534 "The return type of the operator []= must be 'void'"); 5547 "The return type of the operator []= must be 'void'", null, false);
5535 5548
5536 /** 5549 /**
5537 * 7.3 Setters: It is a static warning if a setter declares a return type 5550 * 7.3 Setters: It is a static warning if a setter declares a return type
5538 * other than void. 5551 * other than void.
5539 */ 5552 */
5540 static const StaticWarningCode NON_VOID_RETURN_FOR_SETTER = 5553 static const StaticWarningCode NON_VOID_RETURN_FOR_SETTER =
5541 const StaticWarningCode('NON_VOID_RETURN_FOR_SETTER', 5554 const StaticWarningCode('NON_VOID_RETURN_FOR_SETTER',
5542 "The return type of the setter must be 'void'"); 5555 "The return type of the setter must be 'void'", null, false);
5543 5556
5544 /** 5557 /**
5545 * 15.1 Static Types: A type <i>T</i> is malformed iff: 5558 * 15.1 Static Types: A type <i>T</i> is malformed iff:
5546 * * <i>T</i> has the form <i>id</i> or the form <i>prefix.id</i>, and in the 5559 * * <i>T</i> has the form <i>id</i> or the form <i>prefix.id</i>, and in the
5547 * enclosing lexical scope, the name <i>id</i> (respectively 5560 * enclosing lexical scope, the name <i>id</i> (respectively
5548 * <i>prefix.id</i>) does not denote a type. 5561 * <i>prefix.id</i>) does not denote a type.
5549 * * <i>T</i> denotes a type parameter in the enclosing lexical scope, but 5562 * * <i>T</i> denotes a type parameter in the enclosing lexical scope, but
5550 * occurs in the signature or body of a static member. 5563 * occurs in the signature or body of a static member.
5551 * * <i>T</i> is a parameterized type of the form <i>G&lt;S<sub>1</sub>, .., 5564 * * <i>T</i> is a parameterized type of the form <i>G&lt;S<sub>1</sub>, ..,
5552 * S<sub>n</sub>&gt;</i>, 5565 * S<sub>n</sub>&gt;</i>,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
5631 "The name '{0}' is not a type and cannot be used in a redirected construct or"); 5644 "The name '{0}' is not a type and cannot be used in a redirected construct or");
5632 5645
5633 /** 5646 /**
5634 * 13.12 Return: Let <i>f</i> be the function immediately enclosing a return 5647 * 13.12 Return: Let <i>f</i> be the function immediately enclosing a return
5635 * statement of the form <i>return;</i> It is a static warning if both of the 5648 * statement of the form <i>return;</i> It is a static warning if both of the
5636 * following conditions hold: 5649 * following conditions hold:
5637 * * <i>f</i> is not a generative constructor. 5650 * * <i>f</i> is not a generative constructor.
5638 * * The return type of <i>f</i> may not be assigned to void. 5651 * * The return type of <i>f</i> may not be assigned to void.
5639 */ 5652 */
5640 static const StaticWarningCode RETURN_WITHOUT_VALUE = const StaticWarningCode( 5653 static const StaticWarningCode RETURN_WITHOUT_VALUE = const StaticWarningCode(
5641 'RETURN_WITHOUT_VALUE', "Missing return value after 'return'"); 5654 'RETURN_WITHOUT_VALUE',
5655 "Missing return value after 'return'",
5656 null,
5657 false);
5642 5658
5643 /** 5659 /**
5644 * 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not 5660 * 12.16.3 Static Invocation: It is a static warning if <i>C</i> does not
5645 * declare a static method or getter <i>m</i>. 5661 * declare a static method or getter <i>m</i>.
5646 * 5662 *
5647 * Parameters: 5663 * Parameters:
5648 * 0: the name of the instance member 5664 * 0: the name of the instance member
5649 */ 5665 */
5650 static const StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER = 5666 static const StaticWarningCode STATIC_ACCESS_TO_INSTANCE_MEMBER =
5651 const StaticWarningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER', 5667 const StaticWarningCode('STATIC_ACCESS_TO_INSTANCE_MEMBER',
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
5814 * 1: the name of the enclosing type where the setter is being looked for 5830 * 1: the name of the enclosing type where the setter is being looked for
5815 */ 5831 */
5816 static const StaticWarningCode UNDEFINED_SUPER_SETTER = 5832 static const StaticWarningCode UNDEFINED_SUPER_SETTER =
5817 shared_messages.UNDEFINED_SUPER_SETTER_STATIC_WARNING; 5833 shared_messages.UNDEFINED_SUPER_SETTER_STATIC_WARNING;
5818 5834
5819 /** 5835 /**
5820 * 7.2 Getters: It is a static warning if the return type of a getter is void. 5836 * 7.2 Getters: It is a static warning if the return type of a getter is void.
5821 */ 5837 */
5822 static const StaticWarningCode VOID_RETURN_FOR_GETTER = 5838 static const StaticWarningCode VOID_RETURN_FOR_GETTER =
5823 const StaticWarningCode('VOID_RETURN_FOR_GETTER', 5839 const StaticWarningCode('VOID_RETURN_FOR_GETTER',
5824 "The return type of the getter must not be 'void'"); 5840 "The return type of the getter must not be 'void'", null, false);
5825 5841
5826 /** 5842 /**
5827 * 17.9 Switch: It is a static warning if all of the following conditions 5843 * 17.9 Switch: It is a static warning if all of the following conditions
5828 * hold: 5844 * hold:
5829 * * The switch statement does not have a 'default' clause. 5845 * * The switch statement does not have a 'default' clause.
5830 * * The static type of <i>e</i> is an enumerated typed with elements 5846 * * The static type of <i>e</i> is an enumerated typed with elements
5831 * <i>id<sub>1</sub></i>, &hellip;, <i>id<sub>n</sub></i>. 5847 * <i>id<sub>1</sub></i>, &hellip;, <i>id<sub>n</sub></i>.
5832 * * The sets {<i>e<sub>1</sub></i>, &hellip;, <i>e<sub>k</sub></i>} and 5848 * * The sets {<i>e<sub>1</sub></i>, &hellip;, <i>e<sub>k</sub></i>} and
5833 * {<i>id<sub>1</sub></i>, &hellip;, <i>id<sub>n</sub></i>} are not the 5849 * {<i>id<sub>1</sub></i>, &hellip;, <i>id<sub>n</sub></i>} are not the
5834 * same. 5850 * same.
5835 * 5851 *
5836 * Parameters: 5852 * Parameters:
5837 * 0: the name of the constant that is missing 5853 * 0: the name of the constant that is missing
5838 */ 5854 */
5839 static const StaticWarningCode MISSING_ENUM_CONSTANT_IN_SWITCH = 5855 static const StaticWarningCode MISSING_ENUM_CONSTANT_IN_SWITCH =
5840 const StaticWarningCode( 5856 const StaticWarningCode(
5841 'MISSING_ENUM_CONSTANT_IN_SWITCH', 5857 'MISSING_ENUM_CONSTANT_IN_SWITCH',
5842 "Missing case clause for '{0}'", 5858 "Missing case clause for '{0}'",
5843 "Add a case clause for the missing constant or add a default clause.") ; 5859 "Add a case clause for the missing constant or add a default clause.",
5860 false);
5844 5861
5845 /** 5862 /**
5846 * A flag indicating whether this warning is an error when running with strong 5863 * A flag indicating whether this warning is an error when running with strong
5847 * mode enabled. 5864 * mode enabled.
5848 */ 5865 */
5849 final bool isStrongModeError; 5866 final bool isStrongModeError;
5850 5867
5851 /** 5868 /**
5852 * Initialize a newly created error code to have the given [name]. The message 5869 * Initialize a newly created error code to have the given [name]. The message
5853 * associated with the error will be created from the given [message] 5870 * associated with the error will be created from the given [message]
5854 * template. The correction associated with the error will be created from the 5871 * template. The correction associated with the error will be created from the
5855 * given [correction] template. 5872 * given [correction] template.
5856 */ 5873 */
5857 const StaticWarningCode(String name, String message, 5874 const StaticWarningCode(String name, String message,
5858 [String correction, this.isStrongModeError = false]) 5875 [String correction, this.isStrongModeError = true])
5859 : super(name, message, correction); 5876 : super(name, message, correction);
5860 5877
5861 @override 5878 @override
5862 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity; 5879 ErrorSeverity get errorSeverity => ErrorType.STATIC_WARNING.severity;
5863 5880
5864 @override 5881 @override
5865 ErrorType get type => ErrorType.STATIC_WARNING; 5882 ErrorType get type => ErrorType.STATIC_WARNING;
5866 } 5883 }
5867 5884
5868 /** 5885 /**
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
5981 static const StrongModeCode IMPLICIT_DYNAMIC_VARIABLE = const StrongModeCode( 5998 static const StrongModeCode IMPLICIT_DYNAMIC_VARIABLE = const StrongModeCode(
5982 ErrorType.COMPILE_TIME_ERROR, 5999 ErrorType.COMPILE_TIME_ERROR,
5983 'IMPLICIT_DYNAMIC_VARIABLE', 6000 'IMPLICIT_DYNAMIC_VARIABLE',
5984 "Missing variable type for '{0}'$_implicitDynamicTip"); 6001 "Missing variable type for '{0}'$_implicitDynamicTip");
5985 6002
5986 static const StrongModeCode IMPLICIT_DYNAMIC_FIELD = const StrongModeCode( 6003 static const StrongModeCode IMPLICIT_DYNAMIC_FIELD = const StrongModeCode(
5987 ErrorType.COMPILE_TIME_ERROR, 6004 ErrorType.COMPILE_TIME_ERROR,
5988 'IMPLICIT_DYNAMIC_FIELD', 6005 'IMPLICIT_DYNAMIC_FIELD',
5989 "Missing field type for '{0}'$_implicitDynamicTip"); 6006 "Missing field type for '{0}'$_implicitDynamicTip");
5990 6007
5991 static const StrongModeCode IMPLICIT_DYNAMIC_TYPE = 6008 static const StrongModeCode IMPLICIT_DYNAMIC_TYPE = const StrongModeCode(
5992 const StrongModeCode( 6009 ErrorType.COMPILE_TIME_ERROR,
5993 ErrorType.COMPILE_TIME_ERROR, 6010 'IMPLICIT_DYNAMIC_TYPE',
5994 'IMPLICIT_DYNAMIC_TYPE', 6011 "Missing type arguments for generic type '{0}'"
5995 "Missing type arguments for generic type '{0}'" 6012 "$_implicitDynamicTip");
5996 "$_implicitDynamicTip");
5997 6013
5998 static const StrongModeCode IMPLICIT_DYNAMIC_LIST_LITERAL = 6014 static const StrongModeCode IMPLICIT_DYNAMIC_LIST_LITERAL =
5999 const StrongModeCode( 6015 const StrongModeCode(
6000 ErrorType.COMPILE_TIME_ERROR, 6016 ErrorType.COMPILE_TIME_ERROR,
6001 'IMPLICIT_DYNAMIC_LIST_LITERAL', 6017 'IMPLICIT_DYNAMIC_LIST_LITERAL',
6002 "Missing type argument for list literal$_implicitDynamicTip"); 6018 "Missing type argument for list literal$_implicitDynamicTip");
6003 6019
6004 static const StrongModeCode IMPLICIT_DYNAMIC_MAP_LITERAL = 6020 static const StrongModeCode IMPLICIT_DYNAMIC_MAP_LITERAL =
6005 const StrongModeCode( 6021 const StrongModeCode(
6006 ErrorType.COMPILE_TIME_ERROR, 6022 ErrorType.COMPILE_TIME_ERROR,
6007 'IMPLICIT_DYNAMIC_MAP_LITERAL', 6023 'IMPLICIT_DYNAMIC_MAP_LITERAL',
6008 'Missing type arguments for map literal$_implicitDynamicTip'); 6024 'Missing type arguments for map literal$_implicitDynamicTip');
6009 6025
6010 static const StrongModeCode IMPLICIT_DYNAMIC_FUNCTION = const StrongModeCode( 6026 static const StrongModeCode IMPLICIT_DYNAMIC_FUNCTION = const StrongModeCode(
6011 ErrorType.COMPILE_TIME_ERROR, 6027 ErrorType.COMPILE_TIME_ERROR,
6012 'IMPLICIT_DYNAMIC_FUNCTION', 6028 'IMPLICIT_DYNAMIC_FUNCTION',
6013 "Missing type arguments for generic function '{0}<{1}>'" 6029 "Missing type arguments for generic function '{0}<{1}>'"
6014 "$_implicitDynamicTip"); 6030 "$_implicitDynamicTip");
6015 6031
6016 static const StrongModeCode IMPLICIT_DYNAMIC_METHOD = const StrongModeCode( 6032 static const StrongModeCode IMPLICIT_DYNAMIC_METHOD = const StrongModeCode(
6017 ErrorType.COMPILE_TIME_ERROR, 6033 ErrorType.COMPILE_TIME_ERROR,
6018 'IMPLICIT_DYNAMIC_METHOD', 6034 'IMPLICIT_DYNAMIC_METHOD',
6019 "Missing type arguments for generic method '{0}<{1}>'" 6035 "Missing type arguments for generic method '{0}<{1}>'"
6020 "$_implicitDynamicTip"); 6036 "$_implicitDynamicTip");
6021 6037
6022 static const StrongModeCode IMPLICIT_DYNAMIC_INVOKE = const StrongModeCode( 6038 static const StrongModeCode IMPLICIT_DYNAMIC_INVOKE = const StrongModeCode(
6023 ErrorType.COMPILE_TIME_ERROR, 6039 ErrorType.COMPILE_TIME_ERROR,
6024 'IMPLICIT_DYNAMIC_INVOKE', 6040 'IMPLICIT_DYNAMIC_INVOKE',
6025 "Missing type arguments for calling generic function type '{0}'" 6041 "Missing type arguments for calling generic function type '{0}'"
6026 "$_implicitDynamicTip"); 6042 "$_implicitDynamicTip");
6027 6043
6028 @override 6044 @override
6029 final ErrorType type; 6045 final ErrorType type;
6030 6046
6031 /** 6047 /**
6032 * Initialize a newly created error code to have the given [type] and [name]. 6048 * Initialize a newly created error code to have the given [type] and [name].
6033 * 6049 *
6034 * The message associated with the error will be created from the given 6050 * The message associated with the error will be created from the given
6035 * [message] template. The correction associated with the error will be 6051 * [message] template. The correction associated with the error will be
6036 * created from the optional [correction] template. 6052 * created from the optional [correction] template.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
6074 * Initialize a newly created error code to have the given [name]. 6090 * Initialize a newly created error code to have the given [name].
6075 */ 6091 */
6076 const TodoCode(String name) : super(name, "{0}"); 6092 const TodoCode(String name) : super(name, "{0}");
6077 6093
6078 @override 6094 @override
6079 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 6095 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
6080 6096
6081 @override 6097 @override
6082 ErrorType get type => ErrorType.TODO; 6098 ErrorType get type => ErrorType.TODO;
6083 } 6099 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/source/error_processor.dart ('k') | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698