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

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

Issue 1436433002: Issue 24751. Report a compile time error when @static_field is used with arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 * Parameters: 590 * Parameters:
591 * 0: the name of the ambiguous element 591 * 0: the name of the ambiguous element
592 * 1: the name of the first library that the type is found 592 * 1: the name of the first library that the type is found
593 * 2: the name of the second library that the type is found 593 * 2: the name of the second library that the type is found
594 */ 594 */
595 static const CompileTimeErrorCode AMBIGUOUS_EXPORT = 595 static const CompileTimeErrorCode AMBIGUOUS_EXPORT =
596 const CompileTimeErrorCode('AMBIGUOUS_EXPORT', 596 const CompileTimeErrorCode('AMBIGUOUS_EXPORT',
597 "The name '{0}' is defined in the libraries '{1}' and '{2}'"); 597 "The name '{0}' is defined in the libraries '{1}' and '{2}'");
598 598
599 /** 599 /**
600 * 15 Metadata: The constant expression given in an annotation is type checked
601 * and evaluated in the scope surrounding the declaration being annotated.
602 *
603 * 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class
604 * accessible in the current scope, optionally followed by type arguments.
605 *
606 * 12.11.2 Const: If <i>e</i> is of the form <i>const T.id(a<sub>1</sub>,
607 * &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</sub>, &hellip;
608 * x<sub>n+k</sub>: a<sub>n+k</sub>)</i> it is a compile-time error if
609 * <i>T</i> is not a class accessible in the current scope, optionally
610 * followed by type arguments.
611 *
612 * Parameters:
613 * 0: the name of the non-type element
614 */
615 static const CompileTimeErrorCode ANNOTATION_WITH_NON_CLASS =
616 const CompileTimeErrorCode(
617 'ANNOTATION_WITH_NON_CLASS', "The name '{0}' is not a class");
618
619 /**
600 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does 620 * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
601 * not denote a formal parameter. 621 * not denote a formal parameter.
602 * 622 *
603 * Parameters: 623 * Parameters:
604 * 0: the name of the identifier in the argument definition test that is not a 624 * 0: the name of the identifier in the argument definition test that is not a
605 * parameter 625 * parameter
606 */ 626 */
607 static const CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER = 627 static const CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER =
608 const CompileTimeErrorCode( 628 const CompileTimeErrorCode(
609 'ARGUMENT_DEFINITION_TEST_NON_PARAMETER', "'{0}' is not a parameter"); 629 'ARGUMENT_DEFINITION_TEST_NON_PARAMETER', "'{0}' is not a parameter");
(...skipping 5022 matching lines...) Expand 10 before | Expand all | Expand 10 after
5632 * Initialize a newly created error code to have the given [name]. 5652 * Initialize a newly created error code to have the given [name].
5633 */ 5653 */
5634 const TodoCode(String name) : super(name, "{0}"); 5654 const TodoCode(String name) : super(name, "{0}");
5635 5655
5636 @override 5656 @override
5637 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 5657 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
5638 5658
5639 @override 5659 @override
5640 ErrorType get type => ErrorType.TODO; 5660 ErrorType get type => ErrorType.TODO;
5641 } 5661 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | pkg/analyzer/test/generated/compile_time_error_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698