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

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

Issue 1514683002: fix #25183, add support to ErrorVerifier for generic methods (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 engine.error; 5 library engine.error;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/ast.dart' show AstNode; 9 import 'package:analyzer/src/generated/ast.dart' show AstNode;
10 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
(...skipping 4851 matching lines...) Expand 10 before | Expand all | Expand 10 after
4862 * 0: the name of the actual parameter type 4862 * 0: the name of the actual parameter type
4863 * 1: the name of the expected parameter type, not assignable to the actual 4863 * 1: the name of the expected parameter type, not assignable to the actual
4864 * parameter type 4864 * parameter type
4865 * 2: the name of the class where the overridden method is declared 4865 * 2: the name of the class where the overridden method is declared
4866 */ 4866 */
4867 static const StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE = 4867 static const StaticWarningCode INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE =
4868 const StaticWarningCode('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE', 4868 const StaticWarningCode('INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE',
4869 "The parameter type '{0}' is not assignable to '{1}' as required by th e method it is overriding from '{2}'"); 4869 "The parameter type '{0}' is not assignable to '{1}' as required by th e method it is overriding from '{2}'");
4870 4870
4871 /** 4871 /**
4872 * Generic Method DEP: number of type parameters must match.
4873 * <https://github.com/leafpetersen/dep-generic-methods/blob/master/proposal.m d#function-subtyping>
4874 *
4875 * Parameters:
4876 * 0: the number of type parameters in the method
4877 * 1: the number of type parameters in the overridden method
4878 * 2: the name of the class where the overridden method is declared
4879 */
4880 static const StaticWarningCode INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS =
4881 const StaticWarningCode('INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS',
4882 "The method has {0} type parameters, but it is overriding a method wit h {1} type parameters from '{2}'");
4883
4884 /**
4885 * Generic Method DEP: bounds of type parameters must be compatible.
4886 * <https://github.com/leafpetersen/dep-generic-methods/blob/master/proposal.m d#function-subtyping>
4887 *
4888 * Parameters:
4889 * 0: the type parameter name
4890 * 1: the type parameter bound
4891 * 2: the overridden type parameter name
4892 * 3: the overridden type parameter bound
4893 * 4: the name of the class where the overridden method is declared
4894 */
4895 static const StaticWarningCode INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND =
4896 const StaticWarningCode(
4897 'INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND',
4898 "The type parameter '{0}' extends '{1}', but that is stricter than '{2 }' extends '{3}' in the overridden method from '{4}'");
4899
4900 /**
4872 * 7.1 Instance Methods: It is a static warning if an instance method 4901 * 7.1 Instance Methods: It is a static warning if an instance method
4873 * <i>m1</i> overrides an instance method <i>m2</i> and the type of <i>m1</i> 4902 * <i>m1</i> overrides an instance method <i>m2</i> and the type of <i>m1</i>
4874 * is not a subtype of the type of <i>m2</i>. 4903 * is not a subtype of the type of <i>m2</i>.
4875 * 4904 *
4876 * Parameters: 4905 * Parameters:
4877 * 0: the name of the actual parameter type 4906 * 0: the name of the actual parameter type
4878 * 1: the name of the expected parameter type, not assignable to the actual 4907 * 1: the name of the expected parameter type, not assignable to the actual
4879 * parameter type 4908 * parameter type
4880 * 2: the name of the class where the overridden method is declared 4909 * 2: the name of the class where the overridden method is declared
4881 * See [INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE]. 4910 * See [INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE].
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
5628 * Initialize a newly created error code to have the given [name]. 5657 * Initialize a newly created error code to have the given [name].
5629 */ 5658 */
5630 const TodoCode(String name) : super(name, "{0}"); 5659 const TodoCode(String name) : super(name, "{0}");
5631 5660
5632 @override 5661 @override
5633 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 5662 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
5634 5663
5635 @override 5664 @override
5636 ErrorType get type => ErrorType.TODO; 5665 ErrorType get type => ErrorType.TODO;
5637 } 5666 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698