mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Breaking changes for analyzer version 6.0.0
Change-Id: I792c3d66fb10ab779e2a5011b2909efa5738aba7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265183 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
parent
fd4af5f0ff
commit
21cfe2ce61
|
@ -14,8 +14,7 @@ class ConvertToConstantPattern extends CorrectionProducer {
|
|||
|
||||
@override
|
||||
Future<void> compute(ChangeBuilder builder) async {
|
||||
// TODO(scheglov) Update during https://dart-review.googlesource.com/c/sdk/+/303280
|
||||
final namedType = node.parent;
|
||||
final namedType = node;
|
||||
if (namedType is! NamedType) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -14,16 +14,7 @@ class ConvertToWildcardPattern extends CorrectionProducer {
|
|||
|
||||
@override
|
||||
Future<void> compute(ChangeBuilder builder) async {
|
||||
var namedType = node;
|
||||
|
||||
// TODO(scheglov) Remove after https://dart-review.googlesource.com/c/sdk/+/303280
|
||||
if (namedType is! NamedType) {
|
||||
final parent = node.parent;
|
||||
if (parent is NamedType) {
|
||||
namedType = parent;
|
||||
}
|
||||
}
|
||||
|
||||
final namedType = node;
|
||||
if (namedType is! NamedType) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -21,15 +21,6 @@ class RemoveNameFromDeclarationClause extends CorrectionProducer {
|
|||
@override
|
||||
Future<void> compute(ChangeBuilder builder) async {
|
||||
var type = node;
|
||||
|
||||
// TODO(scheglov) Remove after https://dart-review.googlesource.com/c/sdk/+/303280
|
||||
if (type is! NamedType) {
|
||||
final parent = node.parent;
|
||||
if (parent is NamedType) {
|
||||
type = parent;
|
||||
}
|
||||
}
|
||||
|
||||
var clause = type.parent;
|
||||
|
||||
if (clause == null) {
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
## 6.0.0 (Not yet released - breaking changes)
|
||||
* Remove deprecated `declaredElement2` from AST.
|
||||
* Remove deprecated `element2` from AST.
|
||||
* Remove deprecated `name2` from AST.
|
||||
* Remove deprecated `FunctionBody.isPotentiallyMutatedInClosure`.
|
||||
* Remove deprecated `extensionName`, `staticElement` from `ExtensionOverride`.
|
||||
* Remove deprecated `name` from `NamedType`.
|
||||
|
||||
## 5.14.0-dev
|
||||
* Updated SDK constraint to `>=3.0.0 <4.0.0`.
|
||||
* Make AST classes `abstract final` or `sealed`.
|
||||
|
|
|
@ -62,10 +62,6 @@ abstract class AugmentationImportElement implements _ExistingElement {
|
|||
@override
|
||||
LibraryOrAugmentationElement get enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
LibraryOrAugmentationElement get enclosingElement3;
|
||||
|
||||
/// Returns the [LibraryAugmentationElement], if [uri] is a
|
||||
/// [DirectiveUriWithAugmentation].
|
||||
LibraryAugmentationElement? get importedAugmentation;
|
||||
|
@ -264,20 +260,6 @@ abstract class ClassElement
|
|||
/// </blockquote>
|
||||
bool get isValidMixin;
|
||||
|
||||
/// Return a list containing all of the superclass constraints defined for
|
||||
/// this class. The list will be empty if this class does not represent a
|
||||
/// mixin declaration. If this class _does_ represent a mixin declaration but
|
||||
/// the declaration does not have an `on` clause, then the list will contain
|
||||
/// the type for the class `Object`.
|
||||
///
|
||||
/// <b>Note:</b> Because the element model represents the state of the code,
|
||||
/// it is possible for it to be semantically invalid. In particular, it is not
|
||||
/// safe to assume that the inheritance structure of a class does not contain
|
||||
/// a cycle. Clients that traverse the inheritance structure must explicitly
|
||||
/// guard against infinite loops.
|
||||
@Deprecated('This getter is implemented only for MixinElement')
|
||||
List<InterfaceType> get superclassConstraints;
|
||||
|
||||
/// Return `true` if this element, assuming that it is within scope, is
|
||||
/// extendable to classes in the given [library].
|
||||
bool isExtendableIn(LibraryElement library);
|
||||
|
@ -301,10 +283,6 @@ abstract class ClassMemberElement implements Element {
|
|||
@override
|
||||
Element get enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3;
|
||||
|
||||
/// Return `true` if this element is a static element. A static element is an
|
||||
/// element that is not associated with a particular instance, but rather with
|
||||
/// an entire library or class.
|
||||
|
@ -339,20 +317,10 @@ abstract class CompilationUnitElement implements UriReferencedElement {
|
|||
@override
|
||||
LibraryOrAugmentationElement get enclosingElement;
|
||||
|
||||
/// Return the library, or library augmentation that encloses this unit.
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
LibraryOrAugmentationElement get enclosingElement3;
|
||||
|
||||
/// Return a list containing all of the enums contained in this compilation
|
||||
/// unit.
|
||||
List<EnumElement> get enums;
|
||||
|
||||
/// Return a list containing all of the enums contained in this compilation
|
||||
/// unit.
|
||||
@Deprecated('Use enums instead')
|
||||
List<EnumElement> get enums2;
|
||||
|
||||
/// Return a list containing all of the extensions contained in this
|
||||
/// compilation unit.
|
||||
List<ExtensionElement> get extensions;
|
||||
|
@ -368,11 +336,6 @@ abstract class CompilationUnitElement implements UriReferencedElement {
|
|||
/// unit.
|
||||
List<MixinElement> get mixins;
|
||||
|
||||
/// Return a list containing all of the mixins contained in this compilation
|
||||
/// unit.
|
||||
@Deprecated('Use mixins instead')
|
||||
List<MixinElement> get mixins2;
|
||||
|
||||
@override
|
||||
AnalysisSession get session;
|
||||
|
||||
|
@ -393,12 +356,6 @@ abstract class CompilationUnitElement implements UriReferencedElement {
|
|||
/// [name], or `null` if this compilation unit does not define an enum with
|
||||
/// the given name.
|
||||
EnumElement? getEnum(String name);
|
||||
|
||||
/// Return the enum defined in this compilation unit that has the given
|
||||
/// [name], or `null` if this compilation unit does not define an enum with
|
||||
/// the given name.
|
||||
@Deprecated('Use getEnum() instead')
|
||||
EnumElement? getEnum2(String name);
|
||||
}
|
||||
|
||||
/// An element representing a constructor augmentation.
|
||||
|
@ -434,10 +391,6 @@ abstract class ConstructorElement
|
|||
@override
|
||||
InterfaceElement get enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
InterfaceElement get enclosingElement3;
|
||||
|
||||
/// Return `true` if this constructor is a const constructor.
|
||||
bool get isConst;
|
||||
|
||||
|
@ -587,12 +540,6 @@ abstract class Element implements AnalysisTarget {
|
|||
/// libraries are the top-level elements in the model.
|
||||
Element? get enclosingElement;
|
||||
|
||||
/// Return the element that either physically or logically encloses this
|
||||
/// element. This will be `null` if this element is a library because
|
||||
/// libraries are the top-level elements in the model.
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
Element? get enclosingElement3;
|
||||
|
||||
/// Return `true` if this element has an annotation of the form
|
||||
/// `@alwaysThrows`.
|
||||
bool get hasAlwaysThrows;
|
||||
|
@ -795,16 +742,6 @@ abstract class Element implements AnalysisTarget {
|
|||
/// </blockquote>
|
||||
bool isAccessibleIn(LibraryElement library);
|
||||
|
||||
/// Return `true` if this element, assuming that it is within scope, is
|
||||
/// accessible to code in the given [library]. This is defined by the Dart
|
||||
/// Language Specification in section 6.2:
|
||||
/// <blockquote>
|
||||
/// A declaration <i>m</i> is accessible to a library <i>L</i> if <i>m</i> is
|
||||
/// declared in <i>L</i> or if <i>m</i> is public.
|
||||
/// </blockquote>
|
||||
@Deprecated('Use isAccessibleIn() instead')
|
||||
bool isAccessibleIn2(LibraryElement library);
|
||||
|
||||
/// Return either this element or the most immediate ancestor of this element
|
||||
/// for which the [predicate] returns `true`, or `null` if there is no such
|
||||
/// element.
|
||||
|
@ -1221,10 +1158,6 @@ abstract class ExecutableElement implements FunctionTypedElement {
|
|||
@override
|
||||
Element get enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3;
|
||||
|
||||
/// Return `true` if this executable element did not have an explicit return
|
||||
/// type specified for it in the original source.
|
||||
bool get hasImplicitReturnType;
|
||||
|
@ -1275,10 +1208,6 @@ abstract class ExtensionElement implements TypeParameterizedElement {
|
|||
@override
|
||||
CompilationUnitElement get enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
CompilationUnitElement get enclosingElement3;
|
||||
|
||||
/// Return the type that is extended by this extension.
|
||||
DartType get extendedType;
|
||||
|
||||
|
@ -1676,10 +1605,6 @@ abstract class InterfaceOrAugmentationElement
|
|||
@override
|
||||
CompilationUnitElement get enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
CompilationUnitElement get enclosingElement3;
|
||||
|
||||
/// Return a list containing all of the fields declared in this class.
|
||||
List<FieldElement> get fields;
|
||||
|
||||
|
@ -1734,10 +1659,6 @@ abstract class LabelElement implements Element {
|
|||
@override
|
||||
ExecutableElement get enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
ExecutableElement get enclosingElement3;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
}
|
||||
|
@ -1804,10 +1725,6 @@ abstract class LibraryElement
|
|||
/// Returns the list of `part` directives of this library.
|
||||
List<PartElement> get parts;
|
||||
|
||||
/// Returns the list of `part` directives of this library.
|
||||
@Deprecated('Use parts instead')
|
||||
List<PartElement> get parts2;
|
||||
|
||||
/// The public [Namespace] of this library.
|
||||
Namespace get publicNamespace;
|
||||
|
||||
|
@ -2201,18 +2118,9 @@ abstract class PrefixElement implements _ExistingElement {
|
|||
@override
|
||||
LibraryOrAugmentationElement get enclosingElement;
|
||||
|
||||
/// Return the library, or library augmentation that encloses this element.
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
LibraryOrAugmentationElement get enclosingElement3;
|
||||
|
||||
/// Return the imports that share this prefix.
|
||||
List<LibraryImportElement> get imports;
|
||||
|
||||
/// Return the imports that share this prefix.
|
||||
@Deprecated('Use imports instead')
|
||||
List<LibraryImportElement> get imports2;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
|
@ -2282,10 +2190,6 @@ abstract class PropertyAccessorElement implements ExecutableElement {
|
|||
@override
|
||||
Element get enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3;
|
||||
|
||||
/// Return `true` if this accessor represents a getter.
|
||||
bool get isGetter;
|
||||
|
||||
|
@ -2405,10 +2309,6 @@ abstract class TypeAliasElement
|
|||
@override
|
||||
CompilationUnitElement get enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
CompilationUnitElement get enclosingElement3;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
|
|
|
@ -1621,10 +1621,6 @@ abstract final class AugmentationImportDirective implements UriBasedDirective {
|
|||
@override
|
||||
AugmentationImportElement? get element;
|
||||
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
AugmentationImportElement? get element2;
|
||||
|
||||
/// The token representing the 'import' keyword.
|
||||
Token get importKeyword;
|
||||
|
||||
|
@ -1663,10 +1659,6 @@ final class AugmentationImportDirectiveImpl extends UriBasedDirectiveImpl
|
|||
return super.element as AugmentationImportElementImpl?;
|
||||
}
|
||||
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
AugmentationImportElement? get element2 => element;
|
||||
|
||||
@override
|
||||
Token get endToken => semicolon;
|
||||
|
||||
|
@ -2456,11 +2448,6 @@ abstract final class CatchClause implements AstNode {
|
|||
/// `null` if there is no 'catch' keyword.
|
||||
CatchClauseParameter? get exceptionParameter;
|
||||
|
||||
/// Return the parameter whose value will be the exception that was thrown, or
|
||||
/// `null` if there is no 'catch' keyword.
|
||||
@Deprecated('Use exceptionParameter instead')
|
||||
CatchClauseParameter? get exceptionParameter2;
|
||||
|
||||
/// Return the type of exceptions caught by this catch clause, or `null` if
|
||||
/// this catch clause catches every type of exception.
|
||||
TypeAnnotation? get exceptionType;
|
||||
|
@ -2478,11 +2465,6 @@ abstract final class CatchClause implements AstNode {
|
|||
/// Return the parameter whose value will be the stack trace associated with
|
||||
/// the exception, or `null` if there is no stack trace parameter.
|
||||
CatchClauseParameter? get stackTraceParameter;
|
||||
|
||||
/// Return the parameter whose value will be the stack trace associated with
|
||||
/// the exception, or `null` if there is no stack trace parameter.
|
||||
@Deprecated('Use stackTraceParameter instead')
|
||||
CatchClauseParameter? get stackTraceParameter2;
|
||||
}
|
||||
|
||||
/// A catch clause within a try statement.
|
||||
|
@ -2585,12 +2567,6 @@ final class CatchClauseImpl extends AstNodeImpl implements CatchClause {
|
|||
_becomeParentOf(parameter);
|
||||
}
|
||||
|
||||
@Deprecated('Use exceptionParameter instead')
|
||||
@override
|
||||
CatchClauseParameterImpl? get exceptionParameter2 {
|
||||
return exceptionParameter;
|
||||
}
|
||||
|
||||
@override
|
||||
TypeAnnotationImpl? get exceptionType => _exceptionType;
|
||||
|
||||
|
@ -2608,12 +2584,6 @@ final class CatchClauseImpl extends AstNodeImpl implements CatchClause {
|
|||
_becomeParentOf(parameter);
|
||||
}
|
||||
|
||||
@Deprecated('Use stackTraceParameter instead')
|
||||
@override
|
||||
CatchClauseParameterImpl? get stackTraceParameter2 {
|
||||
return stackTraceParameter;
|
||||
}
|
||||
|
||||
@override
|
||||
ChildEntities get _childEntities => ChildEntities()
|
||||
..addToken('onKeyword', onKeyword)
|
||||
|
@ -2774,10 +2744,6 @@ abstract final class ClassAugmentationDeclaration
|
|||
|
||||
@override
|
||||
ClassAugmentationElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ClassAugmentationElement? get declaredElement2;
|
||||
}
|
||||
|
||||
/// The declaration of a class.
|
||||
|
@ -2797,10 +2763,6 @@ abstract final class ClassDeclaration
|
|||
@override
|
||||
ClassElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ClassElement? get declaredElement2;
|
||||
|
||||
/// Returns the implements clause for the class/mixin, or `null` if the
|
||||
/// class/mixin does not implement any interfaces.
|
||||
@override
|
||||
|
@ -2961,10 +2923,6 @@ final class ClassDeclarationImpl extends NamedCompilationUnitMemberImpl
|
|||
_members._initialize(this, members);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ClassElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken => rightBracket;
|
||||
|
||||
|
@ -3097,10 +3055,6 @@ abstract final class ClassOrAugmentationDeclaration
|
|||
@override
|
||||
ClassOrAugmentationElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ClassOrAugmentationElement? get declaredElement2;
|
||||
|
||||
/// Returns the `extends` clause for this class, or `null` if the class
|
||||
/// does not extend any other class.
|
||||
///
|
||||
|
@ -3165,10 +3119,6 @@ abstract final class ClassTypeAlias implements TypeAlias {
|
|||
@override
|
||||
ClassElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ClassElement? get declaredElement2;
|
||||
|
||||
/// Return the token for the '=' separating the name from the definition.
|
||||
Token get equals;
|
||||
|
||||
|
@ -3311,10 +3261,6 @@ final class ClassTypeAliasImpl extends TypeAliasImpl implements ClassTypeAlias {
|
|||
_becomeParentOf(_implementsClause);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ClassElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get firstTokenAfterCommentAndMetadata {
|
||||
return abstractKeyword ??
|
||||
|
@ -4396,10 +4342,6 @@ abstract final class ConstructorDeclaration implements ClassMember {
|
|||
@override
|
||||
ConstructorElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ConstructorElement? get declaredElement2;
|
||||
|
||||
/// Return the token for the 'external' keyword to the given [token].
|
||||
Token? get externalKeyword;
|
||||
|
||||
|
@ -4414,11 +4356,6 @@ abstract final class ConstructorDeclaration implements ClassMember {
|
|||
/// declared is unnamed.
|
||||
Token? get name;
|
||||
|
||||
/// Return the name of the constructor, or `null` if the constructor being
|
||||
/// declared is unnamed.
|
||||
@Deprecated('Use name instead')
|
||||
Token? get name2;
|
||||
|
||||
/// Return the parameters associated with the constructor.
|
||||
FormalParameterList get parameters;
|
||||
|
||||
|
@ -4566,10 +4503,6 @@ final class ConstructorDeclarationImpl extends ClassMemberImpl
|
|||
_body = _becomeParentOf(functionBody);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ConstructorElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken {
|
||||
return _body.endToken;
|
||||
|
@ -4595,10 +4528,6 @@ final class ConstructorDeclarationImpl extends ClassMemberImpl
|
|||
body is EmptyFunctionBody &&
|
||||
externalKeyword == null;
|
||||
|
||||
@Deprecated('Use name instead')
|
||||
@override
|
||||
Token? get name2 => name;
|
||||
|
||||
@override
|
||||
FormalParameterListImpl get parameters => _parameters;
|
||||
|
||||
|
@ -5207,12 +5136,6 @@ abstract final class Declaration implements AnnotatedNode {
|
|||
/// this node corresponds to a list of declarations or if the AST structure
|
||||
/// has not been resolved.
|
||||
Element? get declaredElement;
|
||||
|
||||
/// Return the element associated with this declaration, or `null` if either
|
||||
/// this node corresponds to a list of declarations or if the AST structure
|
||||
/// has not been resolved.
|
||||
@Deprecated('Use declaredElement instead')
|
||||
Element? get declaredElement2;
|
||||
}
|
||||
|
||||
/// A node that represents the declaration of one or more names. Each declared
|
||||
|
@ -5237,10 +5160,6 @@ abstract final class DeclaredIdentifier implements Declaration {
|
|||
@override
|
||||
LocalVariableElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
LocalVariableElement? get declaredElement2;
|
||||
|
||||
/// Return `true` if this variable was declared with the 'const' modifier.
|
||||
bool get isConst;
|
||||
|
||||
|
@ -5296,10 +5215,6 @@ final class DeclaredIdentifierImpl extends DeclarationImpl
|
|||
_becomeParentOf(_type);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
LocalVariableElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken => name;
|
||||
|
||||
|
@ -5580,11 +5495,6 @@ sealed class Directive implements AnnotatedNode {
|
|||
/// Return the element associated with this directive, or `null` if the AST
|
||||
/// structure has not been resolved.
|
||||
Element? get element;
|
||||
|
||||
/// Return the element associated with this directive, or `null` if the AST
|
||||
/// structure has not been resolved.
|
||||
@Deprecated('Use element instead')
|
||||
Element? get element2;
|
||||
}
|
||||
|
||||
/// A node that represents a directive.
|
||||
|
@ -5616,10 +5526,6 @@ sealed class DirectiveImpl extends AnnotatedNodeImpl implements Directive {
|
|||
set element(Element? element) {
|
||||
_element = element;
|
||||
}
|
||||
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
Element? get element2 => element;
|
||||
}
|
||||
|
||||
/// A do statement.
|
||||
|
@ -6038,10 +5944,6 @@ abstract final class EnumConstantDeclaration implements Declaration {
|
|||
|
||||
/// Return the name of the constant.
|
||||
Token get name;
|
||||
|
||||
/// Return the name of the constant.
|
||||
@Deprecated('Use name instead')
|
||||
Token get name2;
|
||||
}
|
||||
|
||||
/// The declaration of an enum constant.
|
||||
|
@ -6071,20 +5973,12 @@ final class EnumConstantDeclarationImpl extends DeclarationImpl
|
|||
_becomeParentOf(arguments);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
FieldElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken => arguments?.endToken ?? name;
|
||||
|
||||
@override
|
||||
Token get firstTokenAfterCommentAndMetadata => name;
|
||||
|
||||
@Deprecated('Use name instead')
|
||||
@override
|
||||
Token get name2 => name;
|
||||
|
||||
@override
|
||||
ChildEntities get _childEntities => super._childEntities
|
||||
..addToken('name', name)
|
||||
|
@ -6116,10 +6010,6 @@ abstract final class EnumDeclaration implements NamedCompilationUnitMember {
|
|||
@override
|
||||
EnumElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
EnumElement? get declaredElement2;
|
||||
|
||||
/// Return the 'enum' keyword.
|
||||
Token get enumKeyword;
|
||||
|
||||
|
@ -6222,10 +6112,6 @@ final class EnumDeclarationImpl extends NamedCompilationUnitMemberImpl
|
|||
@override
|
||||
NodeListImpl<EnumConstantDeclarationImpl> get constants => _constants;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
EnumElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken => rightBracket;
|
||||
|
||||
|
@ -6296,12 +6182,6 @@ abstract final class ExportDirective implements NamespaceDirective {
|
|||
@override
|
||||
LibraryExportElement? get element;
|
||||
|
||||
/// Return the element associated with this directive, or `null` if the AST
|
||||
/// structure has not been resolved.
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
LibraryExportElement? get element2;
|
||||
|
||||
/// The token representing the 'export' keyword.
|
||||
Token get exportKeyword;
|
||||
}
|
||||
|
@ -6334,10 +6214,6 @@ final class ExportDirectiveImpl extends NamespaceDirectiveImpl
|
|||
return super.element as LibraryExportElementImpl?;
|
||||
}
|
||||
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
LibraryExportElementImpl? get element2 => element;
|
||||
|
||||
@override
|
||||
Token get firstTokenAfterCommentAndMetadata => exportKeyword;
|
||||
|
||||
|
@ -6796,10 +6672,6 @@ abstract final class ExtensionDeclaration implements CompilationUnitMember {
|
|||
@override
|
||||
ExtensionElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ExtensionElement? get declaredElement2;
|
||||
|
||||
/// Return the type that is being extended.
|
||||
TypeAnnotation get extendedType;
|
||||
|
||||
|
@ -6816,11 +6688,6 @@ abstract final class ExtensionDeclaration implements CompilationUnitMember {
|
|||
/// a name.
|
||||
Token? get name;
|
||||
|
||||
/// Return the name of the extension, or `null` if the extension does not have
|
||||
/// a name.
|
||||
@Deprecated('Use name instead')
|
||||
Token? get name2;
|
||||
|
||||
/// Return the token representing the 'on' keyword.
|
||||
Token get onKeyword;
|
||||
|
||||
|
@ -6894,10 +6761,6 @@ final class ExtensionDeclarationImpl extends CompilationUnitMemberImpl
|
|||
_members._initialize(this, members);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ExtensionElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken => rightBracket;
|
||||
|
||||
|
@ -6914,10 +6777,6 @@ final class ExtensionDeclarationImpl extends CompilationUnitMemberImpl
|
|||
@override
|
||||
NodeListImpl<ClassMemberImpl> get members => _members;
|
||||
|
||||
@Deprecated('Use name instead')
|
||||
@override
|
||||
Token? get name2 => name;
|
||||
|
||||
@override
|
||||
TypeParameterListImpl? get typeParameters => _typeParameters;
|
||||
|
||||
|
@ -6970,10 +6829,6 @@ abstract final class ExtensionOverride implements Expression {
|
|||
/// Return `null` if the AST structure has not been resolved.
|
||||
DartType? get extendedType;
|
||||
|
||||
/// Return the name of the extension being selected.
|
||||
@Deprecated('Use importPrefix, name, and element instead')
|
||||
Identifier get extensionName;
|
||||
|
||||
/// The optional import prefix before [name].
|
||||
ImportPrefixReference? get importPrefix;
|
||||
|
||||
|
@ -6983,12 +6838,6 @@ abstract final class ExtensionOverride implements Expression {
|
|||
/// The name of the extension being selected.
|
||||
Token get name;
|
||||
|
||||
/// Return the forced extension element.
|
||||
///
|
||||
/// Return `null` if the AST structure has not been resolved.
|
||||
@Deprecated('Use element instead')
|
||||
ExtensionElement? get staticElement;
|
||||
|
||||
/// Return the type arguments to be applied to the extension, or `null` if no
|
||||
/// type arguments were provided.
|
||||
TypeArgumentList? get typeArguments;
|
||||
|
@ -7010,10 +6859,6 @@ abstract final class ExtensionOverride implements Expression {
|
|||
/// [Identifier] [TypeArgumentList]? [ArgumentList]
|
||||
final class ExtensionOverrideImpl extends ExpressionImpl
|
||||
implements ExtensionOverride {
|
||||
/// Cache results of `name` invocation. There is existing code that uses it,
|
||||
/// and relies on the fact that the same result is returned every time.
|
||||
static final _nameCache = Expando<IdentifierImpl>();
|
||||
|
||||
@override
|
||||
final ImportPrefixReferenceImpl? importPrefix;
|
||||
|
||||
|
@ -7063,32 +6908,6 @@ final class ExtensionOverrideImpl extends ExpressionImpl
|
|||
@override
|
||||
Token get endToken => _argumentList.endToken;
|
||||
|
||||
@Deprecated('Use importPrefix, extensionName2, staticElement instead')
|
||||
@override
|
||||
IdentifierImpl get extensionName {
|
||||
var result = _nameCache[this];
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
final importPrefix = this.importPrefix;
|
||||
if (importPrefix != null) {
|
||||
result = PrefixedIdentifierImpl(
|
||||
prefix: SimpleIdentifierImpl(importPrefix.name)
|
||||
..staticElement = importPrefix.element,
|
||||
period: importPrefix.period,
|
||||
identifier: SimpleIdentifierImpl(name)..staticElement = staticElement,
|
||||
).._parent = this;
|
||||
} else {
|
||||
result = SimpleIdentifierImpl(name)
|
||||
.._parent = this
|
||||
..staticElement = staticElement;
|
||||
}
|
||||
|
||||
_nameCache[this] = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
@override
|
||||
bool get isNullAware {
|
||||
var nextType = argumentList.endToken.next!.type;
|
||||
|
@ -7099,10 +6918,6 @@ final class ExtensionOverrideImpl extends ExpressionImpl
|
|||
@override
|
||||
Precedence get precedence => Precedence.postfix;
|
||||
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
ExtensionElement get staticElement => element;
|
||||
|
||||
@override
|
||||
TypeArgumentListImpl? get typeArguments => _typeArguments;
|
||||
|
||||
|
@ -7130,9 +6945,6 @@ final class ExtensionOverrideImpl extends ExpressionImpl
|
|||
@override
|
||||
void visitChildren(AstVisitor visitor) {
|
||||
importPrefix?.accept(visitor);
|
||||
// TODO(scheglov) Remove when removing `extensionName`.
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
extensionName.accept(visitor);
|
||||
_typeArguments?.accept(visitor);
|
||||
_argumentList.accept(visitor);
|
||||
}
|
||||
|
@ -7238,10 +7050,6 @@ final class FieldDeclarationImpl extends ClassMemberImpl
|
|||
@override
|
||||
Element? get declaredElement => null;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
Element? get declaredElement2 => null;
|
||||
|
||||
@override
|
||||
Token get endToken => semicolon;
|
||||
|
||||
|
@ -8500,18 +8308,6 @@ sealed class FunctionBody implements AstNode {
|
|||
/// there is no star.
|
||||
Token? get star;
|
||||
|
||||
/// If [variable] is a local variable or parameter declared anywhere within
|
||||
/// the top level function or method containing this [FunctionBody], return a
|
||||
/// boolean indicating whether [variable] is potentially mutated within a
|
||||
/// local function other than the function in which it is declared.
|
||||
///
|
||||
/// If [variable] is not a local variable or parameter declared within the top
|
||||
/// level function or method containing this [FunctionBody], return `false`.
|
||||
///
|
||||
/// Throws an exception if resolution has not yet been performed.
|
||||
@Deprecated('Not used by clients')
|
||||
bool isPotentiallyMutatedInClosure(VariableElement variable);
|
||||
|
||||
/// If [variable] is a local variable or parameter declared anywhere within
|
||||
/// the top level function or method containing this [FunctionBody], return a
|
||||
/// boolean indicating whether [variable] is potentially mutated within the
|
||||
|
@ -8558,15 +8354,6 @@ sealed class FunctionBodyImpl extends AstNodeImpl implements FunctionBody {
|
|||
@override
|
||||
Token? get star => null;
|
||||
|
||||
@Deprecated('Not used by clients')
|
||||
@override
|
||||
bool isPotentiallyMutatedInClosure(VariableElement variable) {
|
||||
if (localVariableInfo == null) {
|
||||
throw StateError('Resolution has not yet been performed');
|
||||
}
|
||||
return localVariableInfo!.potentiallyMutatedInClosure.contains(variable);
|
||||
}
|
||||
|
||||
@override
|
||||
bool isPotentiallyMutatedInScope(VariableElement variable) {
|
||||
if (localVariableInfo == null) {
|
||||
|
@ -8599,10 +8386,6 @@ abstract final class FunctionDeclaration implements NamedCompilationUnitMember {
|
|||
@override
|
||||
ExecutableElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ExecutableElement? get declaredElement2;
|
||||
|
||||
/// Return the token representing the 'external' keyword, or `null` if this is
|
||||
/// not an external function.
|
||||
Token? get externalKeyword;
|
||||
|
@ -8682,10 +8465,6 @@ final class FunctionDeclarationImpl extends NamedCompilationUnitMemberImpl
|
|||
_becomeParentOf(_functionExpression);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ExecutableElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken => _functionExpression.endToken;
|
||||
|
||||
|
@ -9112,10 +8891,6 @@ abstract final class FunctionTypeAlias implements TypeAlias {
|
|||
@override
|
||||
TypeAliasElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
TypeAliasElement? get declaredElement2;
|
||||
|
||||
/// Return the parameters associated with the function type.
|
||||
FormalParameterList get parameters;
|
||||
|
||||
|
@ -9173,10 +8948,6 @@ final class FunctionTypeAliasImpl extends TypeAliasImpl
|
|||
_becomeParentOf(_parameters);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
TypeAliasElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
FormalParameterListImpl get parameters => _parameters;
|
||||
|
||||
|
@ -9592,10 +9363,6 @@ final class GenericTypeAliasImpl extends TypeAliasImpl
|
|||
_becomeParentOf(_type);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
Element? get declaredElement2 => declaredElement;
|
||||
|
||||
/// The type of function being defined by the alias.
|
||||
///
|
||||
/// If the non-function type aliases feature is enabled, a type alias may have
|
||||
|
@ -10300,12 +10067,6 @@ abstract final class ImportDirective implements NamespaceDirective {
|
|||
@override
|
||||
LibraryImportElement? get element;
|
||||
|
||||
/// Return the element associated with this directive, or `null` if the AST
|
||||
/// structure has not been resolved.
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
LibraryImportElement? get element2;
|
||||
|
||||
/// The token representing the 'import' keyword.
|
||||
Token get importKeyword;
|
||||
|
||||
|
@ -10365,10 +10126,6 @@ final class ImportDirectiveImpl extends NamespaceDirectiveImpl
|
|||
LibraryImportElementImpl? get element =>
|
||||
super.element as LibraryImportElementImpl?;
|
||||
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
LibraryImportElement? get element2 => element;
|
||||
|
||||
@override
|
||||
Token get firstTokenAfterCommentAndMetadata => importKeyword;
|
||||
|
||||
|
@ -11618,10 +11375,6 @@ abstract final class LibraryDirective implements Directive {
|
|||
/// Return the token representing the 'library' keyword.
|
||||
Token get libraryKeyword;
|
||||
|
||||
/// Return the name of the library being defined.
|
||||
@Deprecated('Use name2')
|
||||
LibraryIdentifier get name;
|
||||
|
||||
/// Return the name of the library being defined.
|
||||
LibraryIdentifier? get name2;
|
||||
|
||||
|
@ -11665,10 +11418,6 @@ final class LibraryDirectiveImpl extends DirectiveImpl
|
|||
@override
|
||||
Token get firstTokenAfterCommentAndMetadata => libraryKeyword;
|
||||
|
||||
@override
|
||||
@Deprecated('Use name2')
|
||||
LibraryIdentifierImpl get name => _name!;
|
||||
|
||||
set name(LibraryIdentifierImpl? name) {
|
||||
_name = _becomeParentOf(name);
|
||||
}
|
||||
|
@ -11996,12 +11745,6 @@ sealed class LiteralImpl extends ExpressionImpl implements Literal {
|
|||
/// Additional information about local variables within a function or method
|
||||
/// produced at resolution time.
|
||||
class LocalVariableInfo {
|
||||
/// The set of local variables and parameters that are potentially mutated
|
||||
/// within a local function other than the function in which they are
|
||||
/// declared.
|
||||
@Deprecated('Not used by clients')
|
||||
final Set<VariableElement> potentiallyMutatedInClosure = <VariableElement>{};
|
||||
|
||||
/// The set of local variables and parameters that are potentially mutated
|
||||
/// within the scope of their declarations.
|
||||
final Set<VariableElement> potentiallyMutatedInScope = <VariableElement>{};
|
||||
|
@ -12468,10 +12211,6 @@ abstract final class MethodDeclaration implements ClassMember {
|
|||
@override
|
||||
ExecutableElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ExecutableElement? get declaredElement2;
|
||||
|
||||
/// Return the token for the 'external' keyword, or `null` if the constructor
|
||||
/// is not external.
|
||||
Token? get externalKeyword;
|
||||
|
@ -12498,10 +12237,6 @@ abstract final class MethodDeclaration implements ClassMember {
|
|||
/// Return the name of the method.
|
||||
Token get name;
|
||||
|
||||
/// Return the name of the method.
|
||||
@Deprecated('Use name instead')
|
||||
Token get name2;
|
||||
|
||||
/// Return the token representing the 'operator' keyword, or `null` if this
|
||||
/// method does not declare an operator.
|
||||
Token? get operatorKeyword;
|
||||
|
@ -12620,10 +12355,6 @@ final class MethodDeclarationImpl extends ClassMemberImpl
|
|||
_body = _becomeParentOf(functionBody);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
ExecutableElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken => _body.endToken;
|
||||
|
||||
|
@ -12654,10 +12385,6 @@ final class MethodDeclarationImpl extends ClassMemberImpl
|
|||
@override
|
||||
bool get isStatic => modifierKeyword?.keyword == Keyword.STATIC;
|
||||
|
||||
@Deprecated('Use name instead')
|
||||
@override
|
||||
Token get name2 => name;
|
||||
|
||||
@override
|
||||
FormalParameterListImpl? get parameters => _parameters;
|
||||
|
||||
|
@ -12938,10 +12665,6 @@ abstract final class MixinAugmentationDeclaration
|
|||
|
||||
@override
|
||||
MixinAugmentationElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
MixinAugmentationElement? get declaredElement2;
|
||||
}
|
||||
|
||||
/// The declaration of a mixin.
|
||||
|
@ -12956,23 +12679,11 @@ abstract final class MixinDeclaration
|
|||
@override
|
||||
MixinElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
MixinElement? get declaredElement2;
|
||||
|
||||
/// Return the 'final' keyword, or `null` if the keyword was absent.
|
||||
@Deprecated('This feature was removed from the language')
|
||||
Token? get finalKeyword;
|
||||
|
||||
/// Returns the implements clause for the class/mixin, or `null` if the
|
||||
/// class/mixin does not implement any interfaces.
|
||||
@override
|
||||
ImplementsClause? get implementsClause;
|
||||
|
||||
/// Return the 'interface' keyword, or `null` if the keyword was absent.
|
||||
@Deprecated('This feature was removed from the language')
|
||||
Token? get interfaceKeyword;
|
||||
|
||||
/// Returns the left curly bracket.
|
||||
@override
|
||||
Token get leftBracket;
|
||||
|
@ -12985,10 +12696,6 @@ abstract final class MixinDeclaration
|
|||
@override
|
||||
Token get rightBracket;
|
||||
|
||||
/// Return the 'sealed' keyword, or `null` if the keyword was absent.
|
||||
@Deprecated('This feature was removed from the language')
|
||||
Token? get sealedKeyword;
|
||||
|
||||
/// Returns the type parameters for the class/mixin, or `null` if the
|
||||
/// class/mixin does not have any type parameters.
|
||||
@override
|
||||
|
@ -13068,17 +12775,9 @@ final class MixinDeclarationImpl extends NamedCompilationUnitMemberImpl
|
|||
_members._initialize(this, members);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
MixinElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken => rightBracket;
|
||||
|
||||
@Deprecated('This feature was removed from the language')
|
||||
@override
|
||||
Token? get finalKeyword => null;
|
||||
|
||||
@override
|
||||
Token get firstTokenAfterCommentAndMetadata {
|
||||
return baseKeyword ?? mixinKeyword;
|
||||
|
@ -13091,10 +12790,6 @@ final class MixinDeclarationImpl extends NamedCompilationUnitMemberImpl
|
|||
_implementsClause = _becomeParentOf(implementsClause);
|
||||
}
|
||||
|
||||
@Deprecated('This feature was removed from the language')
|
||||
@override
|
||||
Token? get interfaceKeyword => null;
|
||||
|
||||
@override
|
||||
NodeListImpl<ClassMemberImpl> get members => _members;
|
||||
|
||||
|
@ -13105,10 +12800,6 @@ final class MixinDeclarationImpl extends NamedCompilationUnitMemberImpl
|
|||
_onClause = _becomeParentOf(onClause);
|
||||
}
|
||||
|
||||
@Deprecated('This feature was removed from the language')
|
||||
@override
|
||||
Token? get sealedKeyword => null;
|
||||
|
||||
@override
|
||||
TypeParameterListImpl? get typeParameters => _typeParameters;
|
||||
|
||||
|
@ -13154,10 +12845,6 @@ abstract final class MixinOrAugmentationDeclaration
|
|||
@override
|
||||
MixinOrAugmentationElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
MixinOrAugmentationElement? get declaredElement2;
|
||||
|
||||
/// Returns the `implements` clause for the mixin, or `null` if the mixin
|
||||
/// does not implement any interfaces.
|
||||
ImplementsClause? get implementsClause;
|
||||
|
@ -13190,10 +12877,6 @@ abstract final class NamedCompilationUnitMember
|
|||
implements CompilationUnitMember {
|
||||
/// Return the name of the member being declared.
|
||||
Token get name;
|
||||
|
||||
/// Return the name of the member being declared.
|
||||
@Deprecated('Use name instead')
|
||||
Token get name2;
|
||||
}
|
||||
|
||||
/// A node that declares a single name within the scope of a compilation unit.
|
||||
|
@ -13211,10 +12894,6 @@ sealed class NamedCompilationUnitMemberImpl extends CompilationUnitMemberImpl
|
|||
required super.metadata,
|
||||
required this.name,
|
||||
});
|
||||
|
||||
@Deprecated('Use name instead')
|
||||
@override
|
||||
Token get name2 => name;
|
||||
}
|
||||
|
||||
/// An expression that has a name associated with it. They are used in method
|
||||
|
@ -13333,10 +13012,6 @@ abstract final class NamedType implements TypeAnnotation {
|
|||
/// </i>p.T</i> where <i>p</i> is a deferred prefix.
|
||||
bool get isDeferred;
|
||||
|
||||
/// Return the name of the type.
|
||||
@Deprecated('Use importPrefix, name2, and element instead')
|
||||
Identifier get name;
|
||||
|
||||
/// Return the name of the type.
|
||||
Token get name2;
|
||||
|
||||
|
@ -13350,10 +13025,6 @@ abstract final class NamedType implements TypeAnnotation {
|
|||
/// typeName ::=
|
||||
/// [Identifier] typeArguments? '?'?
|
||||
final class NamedTypeImpl extends TypeAnnotationImpl implements NamedType {
|
||||
/// Cache results of `name` invocation. There is existing code that uses it,
|
||||
/// and relies on the fact that the same result is returned every time.
|
||||
static final _nameCache = Expando<IdentifierImpl>();
|
||||
|
||||
@override
|
||||
final ImportPrefixReferenceImpl? importPrefix;
|
||||
|
||||
|
@ -13408,32 +13079,6 @@ final class NamedTypeImpl extends TypeAnnotationImpl implements NamedType {
|
|||
@override
|
||||
bool get isSynthetic => name2.isSynthetic && typeArguments == null;
|
||||
|
||||
@Deprecated('Use importPrefix, name2, and element instead')
|
||||
@override
|
||||
IdentifierImpl get name {
|
||||
var result = _nameCache[this];
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
final importPrefix = this.importPrefix;
|
||||
if (importPrefix != null) {
|
||||
result = PrefixedIdentifierImpl(
|
||||
prefix: SimpleIdentifierImpl(importPrefix.name)
|
||||
..staticElement = importPrefix.element,
|
||||
period: importPrefix.period,
|
||||
identifier: SimpleIdentifierImpl(name2)..staticElement = element,
|
||||
).._parent = this;
|
||||
} else {
|
||||
result = SimpleIdentifierImpl(name2)
|
||||
.._parent = this
|
||||
..staticElement = element;
|
||||
}
|
||||
|
||||
_nameCache[this] = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
@override
|
||||
ChildEntities get _childEntities => ChildEntities()
|
||||
..addNode('importPrefix', importPrefix)
|
||||
|
@ -13447,9 +13092,6 @@ final class NamedTypeImpl extends TypeAnnotationImpl implements NamedType {
|
|||
@override
|
||||
void visitChildren(AstVisitor visitor) {
|
||||
importPrefix?.accept(visitor);
|
||||
// TODO(scheglov) Remove when removing `name`.
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
name.accept(visitor);
|
||||
typeArguments?.accept(visitor);
|
||||
}
|
||||
}
|
||||
|
@ -14539,10 +14181,6 @@ abstract final class PartDirective implements UriBasedDirective {
|
|||
@override
|
||||
PartElement? get element;
|
||||
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
PartElement? get element2;
|
||||
|
||||
/// Return the token representing the 'part' keyword.
|
||||
Token get partKeyword;
|
||||
|
||||
|
@ -14580,10 +14218,6 @@ final class PartDirectiveImpl extends UriBasedDirectiveImpl
|
|||
return super.element as PartElement?;
|
||||
}
|
||||
|
||||
@Deprecated('Use element instead')
|
||||
@override
|
||||
PartElement? get element2 => element;
|
||||
|
||||
@override
|
||||
Token get endToken => semicolon;
|
||||
|
||||
|
@ -18684,10 +18318,6 @@ final class TopLevelVariableDeclarationImpl extends CompilationUnitMemberImpl
|
|||
@override
|
||||
Element? get declaredElement => null;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
Element? get declaredElement2 => null;
|
||||
|
||||
@override
|
||||
Token get endToken => semicolon;
|
||||
|
||||
|
@ -19150,20 +18780,12 @@ abstract final class TypeParameter implements Declaration {
|
|||
@override
|
||||
TypeParameterElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
TypeParameterElement? get declaredElement2;
|
||||
|
||||
/// Return the token representing the 'extends' keyword, or `null` if there is
|
||||
/// no explicit upper bound.
|
||||
Token? get extendsKeyword;
|
||||
|
||||
/// Return the name of the type parameter.
|
||||
Token get name;
|
||||
|
||||
/// Return the name of the type parameter.
|
||||
@Deprecated('Use name instead')
|
||||
Token get name2;
|
||||
}
|
||||
|
||||
/// A type parameter.
|
||||
|
@ -19214,10 +18836,6 @@ final class TypeParameterImpl extends DeclarationImpl implements TypeParameter {
|
|||
_bound = _becomeParentOf(type);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
TypeParameterElement? get declaredElement2 => declaredElement;
|
||||
|
||||
@override
|
||||
Token get endToken {
|
||||
return _bound?.endToken ?? name;
|
||||
|
@ -19226,10 +18844,6 @@ final class TypeParameterImpl extends DeclarationImpl implements TypeParameter {
|
|||
@override
|
||||
Token get firstTokenAfterCommentAndMetadata => varianceKeyword ?? name;
|
||||
|
||||
@Deprecated('Use name instead')
|
||||
@override
|
||||
Token get name2 => name;
|
||||
|
||||
@override
|
||||
ChildEntities get _childEntities => super._childEntities
|
||||
..addToken('name', name)
|
||||
|
@ -19422,10 +19036,6 @@ abstract final class VariableDeclaration implements Declaration {
|
|||
@override
|
||||
VariableElement? get declaredElement;
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
VariableElement? get declaredElement2;
|
||||
|
||||
/// Return the equal sign separating the variable name from the initial value,
|
||||
/// or `null` if the initial value was not specified.
|
||||
Token? get equals;
|
||||
|
@ -19448,10 +19058,6 @@ abstract final class VariableDeclaration implements Declaration {
|
|||
|
||||
/// Return the name of the variable being declared.
|
||||
Token get name;
|
||||
|
||||
/// Return the name of the variable being declared.
|
||||
@Deprecated('Use name instead')
|
||||
Token get name2;
|
||||
}
|
||||
|
||||
/// An identifier that has an initial value associated with it. Instances of
|
||||
|
@ -19498,10 +19104,6 @@ final class VariableDeclarationImpl extends DeclarationImpl
|
|||
_becomeParentOf(_initializer);
|
||||
}
|
||||
|
||||
@Deprecated('Use declaredElement instead')
|
||||
@override
|
||||
VariableElement? get declaredElement2 => declaredElement;
|
||||
|
||||
/// This overridden implementation of [documentationComment] looks in the
|
||||
/// grandparent node for Dartdoc comments if no documentation is specifically
|
||||
/// available on the node.
|
||||
|
@ -19553,10 +19155,6 @@ final class VariableDeclarationImpl extends DeclarationImpl
|
|||
return parent is VariableDeclarationList && parent.isLate;
|
||||
}
|
||||
|
||||
@Deprecated('Use name instead')
|
||||
@override
|
||||
Token get name2 => name;
|
||||
|
||||
@override
|
||||
ChildEntities get _childEntities => super._childEntities
|
||||
..addToken('name', name)
|
||||
|
|
|
@ -135,10 +135,6 @@ abstract class AbstractClassElementImpl extends _ExistingElementImpl
|
|||
return _enclosingElement as CompilationUnitElementImpl;
|
||||
}
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
CompilationUnitElementImpl get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
List<FieldElementImpl> get fields;
|
||||
|
||||
|
@ -491,12 +487,6 @@ class AugmentationImportElementImpl extends _ExistingElementImpl
|
|||
return super.enclosingElement as LibraryOrAugmentationElementImpl;
|
||||
}
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
LibraryOrAugmentationElementImpl get enclosingElement3 {
|
||||
return enclosingElement;
|
||||
}
|
||||
|
||||
@override
|
||||
LibraryAugmentationElementImpl? get importedAugmentation {
|
||||
final uri = this.uri;
|
||||
|
@ -811,9 +801,6 @@ class ClassElementImpl extends ClassOrMixinElementImpl implements ClassElement {
|
|||
super.methods = methods;
|
||||
}
|
||||
|
||||
@override
|
||||
List<InterfaceType> get superclassConstraints => const [];
|
||||
|
||||
@override
|
||||
InterfaceType? get supertype {
|
||||
linkedData?.read(this);
|
||||
|
@ -1243,10 +1230,6 @@ class CompilationUnitElementImpl extends UriReferencedElementImpl
|
|||
LibraryOrAugmentationElement get enclosingElement =>
|
||||
super.enclosingElement as LibraryOrAugmentationElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
LibraryOrAugmentationElement get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
CompilationUnitElementImpl get enclosingUnit {
|
||||
return this;
|
||||
|
@ -1265,12 +1248,6 @@ class CompilationUnitElementImpl extends UriReferencedElementImpl
|
|||
_enums = enums;
|
||||
}
|
||||
|
||||
@Deprecated('Use enums instead')
|
||||
@override
|
||||
List<EnumElementImpl> get enums2 {
|
||||
return enums;
|
||||
}
|
||||
|
||||
@override
|
||||
List<ExtensionElementImpl> get extensions {
|
||||
return _extensions;
|
||||
|
@ -1327,12 +1304,6 @@ class CompilationUnitElementImpl extends UriReferencedElementImpl
|
|||
_mixins = mixins;
|
||||
}
|
||||
|
||||
@Deprecated('Use mixins instead')
|
||||
@override
|
||||
List<MixinElementImpl> get mixins2 {
|
||||
return mixins;
|
||||
}
|
||||
|
||||
@override
|
||||
AnalysisSession get session => enclosingElement.session;
|
||||
|
||||
|
@ -1399,12 +1370,6 @@ class CompilationUnitElementImpl extends UriReferencedElementImpl
|
|||
return null;
|
||||
}
|
||||
|
||||
@Deprecated('Use getEnum() instead')
|
||||
@override
|
||||
EnumElement? getEnum2(String name) {
|
||||
return getEnum(name);
|
||||
}
|
||||
|
||||
void setLinkedData(Reference reference, ElementLinkedData linkedData) {
|
||||
this.reference = reference;
|
||||
reference.element = this;
|
||||
|
@ -1514,10 +1479,6 @@ class ConstructorElementImpl extends ExecutableElementImpl
|
|||
InterfaceElement get enclosingElement =>
|
||||
super.enclosingElement as AbstractClassElementImpl;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
InterfaceElement get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
bool get isConst {
|
||||
return hasModifier(Modifier.CONST);
|
||||
|
@ -2370,10 +2331,6 @@ abstract class ElementImpl implements Element {
|
|||
_enclosingElement = element as ElementImpl?;
|
||||
}
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element? get enclosingElement3 => enclosingElement;
|
||||
|
||||
/// Return the enclosing unit element (which might be the same as `this`), or
|
||||
/// `null` if this element is not contained in any compilation unit.
|
||||
CompilationUnitElementImpl get enclosingUnit {
|
||||
|
@ -2843,12 +2800,6 @@ abstract class ElementImpl implements Element {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Deprecated('Use isAccessibleIn() instead')
|
||||
@override
|
||||
bool isAccessibleIn2(LibraryElement library) {
|
||||
return isAccessibleIn(library);
|
||||
}
|
||||
|
||||
void resetMetadataFlags() {
|
||||
_metadataFlags = 0;
|
||||
}
|
||||
|
@ -3210,10 +3161,6 @@ abstract class ExecutableElementImpl extends _ExistingElementImpl
|
|||
@override
|
||||
Element get enclosingElement => super.enclosingElement!;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
bool get hasImplicitReturnType {
|
||||
return hasModifier(Modifier.IMPLICIT_TYPE);
|
||||
|
@ -3435,12 +3382,6 @@ class ExtensionElementImpl extends _ExistingElementImpl
|
|||
return super.enclosingElement as CompilationUnitElementImpl;
|
||||
}
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
CompilationUnitElementImpl get enclosingElement3 {
|
||||
return enclosingElement;
|
||||
}
|
||||
|
||||
@override
|
||||
DartType get extendedType =>
|
||||
ElementTypeProvider.current.getExtendedType(this);
|
||||
|
@ -3953,10 +3894,6 @@ class LabelElementImpl extends ElementImpl implements LabelElement {
|
|||
ExecutableElement get enclosingElement =>
|
||||
super.enclosingElement as ExecutableElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
ExecutableElement get enclosingElement3 => enclosingElement;
|
||||
|
||||
/// Return `true` if this label is associated with a `switch` member (`case
|
||||
/// ` or`default`).
|
||||
bool get isOnSwitchMember => _onSwitchMember;
|
||||
|
@ -4301,10 +4238,6 @@ class LibraryElementImpl extends LibraryOrAugmentationElementImpl
|
|||
_parts = parts;
|
||||
}
|
||||
|
||||
@Deprecated('Use parts instead')
|
||||
@override
|
||||
List<PartElement> get parts2 => parts;
|
||||
|
||||
@override
|
||||
List<PrefixElementImpl> get prefixes =>
|
||||
_prefixes ??= buildPrefixesFromImports(libraryImports);
|
||||
|
@ -5209,10 +5142,6 @@ class MultiplyDefinedElementImpl implements MultiplyDefinedElement {
|
|||
@override
|
||||
Element? get enclosingElement => null;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element? get enclosingElement3 => null;
|
||||
|
||||
@override
|
||||
bool get hasAlwaysThrows => false;
|
||||
|
||||
|
@ -5362,12 +5291,6 @@ class MultiplyDefinedElementImpl implements MultiplyDefinedElement {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Deprecated('Use isAccessibleIn() instead')
|
||||
@override
|
||||
bool isAccessibleIn2(LibraryElement library) {
|
||||
return isAccessibleIn(library);
|
||||
}
|
||||
|
||||
@override
|
||||
E? thisOrAncestorMatching<E extends Element>(
|
||||
bool Function(Element) predicate,
|
||||
|
@ -5454,10 +5377,6 @@ abstract class NonParameterVariableElementImpl extends VariableElementImpl
|
|||
@override
|
||||
Element get enclosingElement => super.enclosingElement!;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3 => enclosingElement;
|
||||
|
||||
bool get hasInitializer {
|
||||
return hasModifier(Modifier.HAS_INITIALIZER);
|
||||
}
|
||||
|
@ -5771,10 +5690,6 @@ class PrefixElementImpl extends _ExistingElementImpl implements PrefixElement {
|
|||
LibraryOrAugmentationElementImpl get enclosingElement =>
|
||||
super.enclosingElement as LibraryOrAugmentationElementImpl;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
LibraryOrAugmentationElementImpl get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
List<LibraryImportElementImpl> get imports {
|
||||
return enclosingElement.libraryImports
|
||||
|
@ -5782,12 +5697,6 @@ class PrefixElementImpl extends _ExistingElementImpl implements PrefixElement {
|
|||
.toList();
|
||||
}
|
||||
|
||||
@Deprecated('Use imports instead')
|
||||
@override
|
||||
List<LibraryImportElementImpl> get imports2 {
|
||||
return imports;
|
||||
}
|
||||
|
||||
@override
|
||||
ElementKind get kind => ElementKind.PREFIX;
|
||||
|
||||
|
@ -5941,10 +5850,6 @@ class PropertyAccessorElementImpl_ImplicitGetter
|
|||
@override
|
||||
Element get enclosingElement => variable.enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
bool get hasImplicitReturnType => variable.hasImplicitType;
|
||||
|
||||
|
@ -6009,10 +5914,6 @@ class PropertyAccessorElementImpl_ImplicitSetter
|
|||
@override
|
||||
Element get enclosingElement => variable.enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
bool get isSetter => true;
|
||||
|
||||
|
@ -6378,10 +6279,6 @@ class TypeAliasElementImpl extends _ExistingElementImpl
|
|||
CompilationUnitElement get enclosingElement =>
|
||||
super.enclosingElement as CompilationUnitElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
CompilationUnitElement get enclosingElement3 => enclosingElement;
|
||||
|
||||
/// Returns whether this alias is a "proper rename" of [aliasedClass], as
|
||||
/// defined in the constructor-tearoffs specification.
|
||||
bool get isProperRename {
|
||||
|
|
|
@ -47,10 +47,6 @@ class ConstructorMember extends ExecutableMember
|
|||
@override
|
||||
InterfaceElement get enclosingElement => declaration.enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
InterfaceElement get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
bool get isConst => declaration.isConst;
|
||||
|
||||
|
@ -357,10 +353,6 @@ class FieldMember extends VariableMember implements FieldElement {
|
|||
@override
|
||||
Element get enclosingElement => declaration.enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
PropertyAccessorElement? get getter {
|
||||
var baseGetter = declaration.getter;
|
||||
|
@ -457,10 +449,6 @@ class FunctionMember extends ExecutableMember implements FunctionElement {
|
|||
@override
|
||||
Element get enclosingElement => declaration.enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
bool get isDartCoreIdentical => declaration.isDartCoreIdentical;
|
||||
|
||||
|
@ -526,10 +514,6 @@ abstract class Member implements Element {
|
|||
@override
|
||||
Element? get enclosingElement => _declaration.enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element? get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
bool get hasAlwaysThrows => _declaration.hasAlwaysThrows;
|
||||
|
||||
|
@ -672,10 +656,6 @@ abstract class Member implements Element {
|
|||
bool isAccessibleIn(LibraryElement library) =>
|
||||
_declaration.isAccessibleIn(library);
|
||||
|
||||
@Deprecated('Use isAccessibleIn() instead')
|
||||
@override
|
||||
bool isAccessibleIn2(LibraryElement library) => isAccessibleIn(library);
|
||||
|
||||
@override
|
||||
E? thisOrAncestorMatching<E extends Element>(
|
||||
bool Function(Element) predicate,
|
||||
|
@ -821,10 +801,6 @@ class MethodMember extends ExecutableMember implements MethodElement {
|
|||
@override
|
||||
Element get enclosingElement => declaration.enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
String get name => declaration.name;
|
||||
|
||||
|
@ -915,10 +891,6 @@ class ParameterMember extends VariableMember
|
|||
@override
|
||||
Element? get enclosingElement => declaration.enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element? get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
bool get hasDefaultValue => declaration.hasDefaultValue;
|
||||
|
||||
|
@ -1057,10 +1029,6 @@ class PropertyAccessorMember extends ExecutableMember
|
|||
@override
|
||||
Element get enclosingElement => declaration.enclosingElement;
|
||||
|
||||
@Deprecated('Use enclosingElement instead')
|
||||
@override
|
||||
Element get enclosingElement3 => enclosingElement;
|
||||
|
||||
@override
|
||||
bool get isGetter => declaration.isGetter;
|
||||
|
||||
|
|
|
@ -4924,11 +4924,6 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
|
|||
);
|
||||
}
|
||||
_localVariableInfo.potentiallyMutatedInScope.add(element);
|
||||
if (_enclosingClosure != null &&
|
||||
element.enclosingElement != _enclosingClosure) {
|
||||
// ignore:deprecated_member_use_from_same_package
|
||||
_localVariableInfo.potentiallyMutatedInClosure.add(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (element is JoinPatternVariableElementImpl) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: analyzer
|
||||
version: 5.14.0-dev
|
||||
version: 6.0.0-dev
|
||||
description: >-
|
||||
This package provides a library that performs static analysis of Dart code.
|
||||
repository: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer
|
||||
|
|
|
@ -18,10 +18,6 @@ main() {
|
|||
|
||||
@reflectiveTest
|
||||
class BreadthFirstVisitorTest extends ParserTestCase {
|
||||
@FailingTest(
|
||||
reason: 'This test should start passing after landing '
|
||||
'https://dart-review.googlesource.com/c/sdk/+/303280',
|
||||
)
|
||||
void test_it() {
|
||||
String source = r'''
|
||||
class A {
|
||||
|
|
|
@ -15,10 +15,6 @@ main() {
|
|||
|
||||
@reflectiveTest
|
||||
class RedirectToNonClassTest extends PubPackageResolutionTest {
|
||||
@FailingTest(
|
||||
reason: 'This test should start passing after landing '
|
||||
'https://dart-review.googlesource.com/c/sdk/+/303280',
|
||||
)
|
||||
test_notAType() async {
|
||||
await assertErrorsInCode('''
|
||||
class B {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
abstract class BaseMembers {
|
||||
base int foo;
|
||||
//^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'base' isn't a type.
|
||||
// ^^^
|
||||
|
|
|
@ -11,7 +11,6 @@ class A {
|
|||
static const field = const B();
|
||||
// ^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
|
||||
// [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER
|
||||
// [cfe] Can't access 'this' in a field initializer to read 'B'.
|
||||
// [cfe] Couldn't find constructor 'B'.
|
||||
}
|
||||
|
|
|
@ -8,27 +8,21 @@ main() {
|
|||
// Integer literals.
|
||||
Expect.isTrue(2 is int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
// [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
|
||||
Expect.equals(2, 2 as int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
Expect.isTrue(-2 is int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
// [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
|
||||
Expect.equals(-2, -2 as int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
Expect.isTrue(0x10 is int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
// [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
|
||||
Expect.isTrue(-0x10 is int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
// [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
|
||||
|
||||
// "a" will be part of hex literal, the following "s" is an error.
|
||||
|
|
|
@ -117,7 +117,6 @@ main() {
|
|||
// [cfe] Expected ')' before this.
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
}
|
||||
{
|
||||
var (int as) = expr<int>();
|
||||
|
@ -129,7 +128,6 @@ main() {
|
|||
// [cfe] This couldn't be parsed.
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
}
|
||||
|
||||
// In a pattern variable declaration, it's an error for an identifier pattern
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
abstract class SealedMembers {
|
||||
sealed int foo;
|
||||
//^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'sealed' isn't a type.
|
||||
// ^^^
|
||||
|
|
|
@ -13,7 +13,6 @@ class A {
|
|||
static const field = const B();
|
||||
// ^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
|
||||
// [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER
|
||||
// [cfe] Can't access 'this' in a field initializer to read 'B'.
|
||||
// [cfe] Couldn't find constructor 'B'.
|
||||
}
|
||||
|
|
|
@ -10,27 +10,21 @@ main() {
|
|||
// Integer literals.
|
||||
Expect.isTrue(2 is int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
// [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
|
||||
Expect.equals(2, 2 as int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
Expect.isTrue(-2 is int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
// [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
|
||||
Expect.equals(-2, -2 as int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
Expect.isTrue(0x10 is int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
// [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
|
||||
Expect.isTrue(-0x10 is int);
|
||||
// ^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION
|
||||
// [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE
|
||||
|
||||
// "a" will be part of hex literal, the following "s" is an error.
|
||||
|
|
Loading…
Reference in a new issue