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

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

Issue 1508183002: fixes #25094, type params in static methods shouldn't always be an error (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merged 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 5434 matching lines...) Expand 10 before | Expand all | Expand 10 after
5445 /** 5445 /**
5446 * 10 Generics: However, a type parameter is considered to be a malformed type 5446 * 10 Generics: However, a type parameter is considered to be a malformed type
5447 * when referenced by a static member. 5447 * when referenced by a static member.
5448 * 5448 *
5449 * 15.1 Static Types: Any use of a malformed type gives rise to a static 5449 * 15.1 Static Types: Any use of a malformed type gives rise to a static
5450 * warning. A malformed type is then interpreted as dynamic by the static type 5450 * warning. A malformed type is then interpreted as dynamic by the static type
5451 * checker and the runtime. 5451 * checker and the runtime.
5452 */ 5452 */
5453 static const StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC = 5453 static const StaticWarningCode TYPE_PARAMETER_REFERENCED_BY_STATIC =
5454 const StaticWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC', 5454 const StaticWarningCode('TYPE_PARAMETER_REFERENCED_BY_STATIC',
5455 "Static members cannot reference type parameters"); 5455 "Static members cannot reference type parameters of the class");
5456 5456
5457 /** 5457 /**
5458 * 12.16.3 Static Invocation: A static method invocation <i>i</i> has the form 5458 * 12.16.3 Static Invocation: A static method invocation <i>i</i> has the form
5459 * <i>C.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: 5459 * <i>C.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>:
5460 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a 5460 * a<sub>n+1</sub>, &hellip; x<sub>n+k</sub>: a<sub>n+k</sub>)</i>. It is a
5461 * static warning if <i>C</i> does not denote a class in the current scope. 5461 * static warning if <i>C</i> does not denote a class in the current scope.
5462 * 5462 *
5463 * Parameters: 5463 * Parameters:
5464 * 0: the name of the undefined class 5464 * 0: the name of the undefined class
5465 */ 5465 */
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
5628 * Initialize a newly created error code to have the given [name]. 5628 * Initialize a newly created error code to have the given [name].
5629 */ 5629 */
5630 const TodoCode(String name) : super(name, "{0}"); 5630 const TodoCode(String name) : super(name, "{0}");
5631 5631
5632 @override 5632 @override
5633 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 5633 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
5634 5634
5635 @override 5635 @override
5636 ErrorType get type => ErrorType.TODO; 5636 ErrorType get type => ErrorType.TODO;
5637 } 5637 }
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