Skip to content

Commit 5404357

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Remove V1 PatternVariableElement.
Change-Id: I6dfbc8cff1d292b1339a559a72e9907ed8fbfdbf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423215 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 73daa66 commit 5404357

File tree

3 files changed

+6
-55
lines changed

3 files changed

+6
-55
lines changed

pkg/analyzer/api.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2967,8 +2967,6 @@ package:analyzer/dart/constant/value.dart:
29672967
toSymbolValue (method: String? Function())
29682968
toTypeValue (method: DartType? Function())
29692969
package:analyzer/dart/element/element.dart:
2970-
BindPatternVariableElement (class extends Object implements PatternVariableElement, deprecated):
2971-
new (constructor: BindPatternVariableElement Function())
29722970
ClassMemberElement (class extends Object implements Element, deprecated):
29732971
new (constructor: ClassMemberElement Function())
29742972
enclosingElement3 (getter: Element)
@@ -3149,10 +3147,6 @@ package:analyzer/dart/element/element.dart:
31493147
ImportElementPrefix (class extends Object, deprecated):
31503148
new (constructor: ImportElementPrefix Function())
31513149
element (getter: PrefixElement)
3152-
JoinPatternVariableElement (class extends Object implements PatternVariableElement, deprecated):
3153-
new (constructor: JoinPatternVariableElement Function())
3154-
isConsistent (getter: bool)
3155-
variables (getter: List<PatternVariableElement>)
31563150
LibraryElement (class extends Object implements _ExistingElement, deprecated):
31573151
new (constructor: LibraryElement Function())
31583152
definingCompilationUnit (getter: CompilationUnitElement, deprecated)
@@ -3228,9 +3222,6 @@ package:analyzer/dart/element/element.dart:
32283222
PartElement (class extends Object implements _ExistingElement, deprecated):
32293223
new (constructor: PartElement Function())
32303224
uri (getter: DirectiveUri)
3231-
PatternVariableElement (class extends Object implements LocalVariableElement, deprecated):
3232-
new (constructor: PatternVariableElement Function())
3233-
join (getter: JoinPatternVariableElement?)
32343225
PrefixElement (class extends Object implements _ExistingElement, deprecated):
32353226
new (constructor: PrefixElement Function())
32363227
enclosingElement3 (getter: CompilationUnitElement, deprecated)

pkg/analyzer/lib/dart/element/element.dart

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ import 'package:analyzer/src/task/api/model.dart' show AnalysisTarget;
6060
import 'package:meta/meta.dart';
6161
import 'package:pub_semver/pub_semver.dart';
6262

63-
/// A pattern variable that is explicitly declared.
64-
///
65-
/// Clients may not extend, implement or mix-in this class.
66-
@Deprecated(
67-
'Use BindPatternVariableFragment and BindPatternVariableElement2 instead')
68-
abstract class BindPatternVariableElement implements PatternVariableElement {}
69-
7063
/// An element that is contained within a [ClassElement].
7164
///
7265
/// Clients may not extend, implement or mix-in this class.
@@ -818,21 +811,6 @@ abstract class ImportElementPrefix {
818811
PrefixElement get element;
819812
}
820813

821-
/// A pattern variable that is a join of other pattern variables, created
822-
/// for a logical-or patterns, or shared `case` bodies in `switch` statements.
823-
///
824-
/// Clients may not extend, implement or mix-in this class.
825-
@Deprecated(
826-
'Use JoinPatternVariableFragment and JoinPatternVariableElement2 instead')
827-
abstract class JoinPatternVariableElement implements PatternVariableElement {
828-
/// Whether the [variables] are consistent, present in all branches,
829-
/// and have the same type and finality.
830-
bool get isConsistent;
831-
832-
/// The variables that join into this variable.
833-
List<PatternVariableElement> get variables;
834-
}
835-
836814
/// A library.
837815
///
838816
/// Clients may not extend, implement or mix-in this class.
@@ -1126,16 +1104,6 @@ abstract class PartElement implements _ExistingElement {
11261104
DirectiveUri get uri;
11271105
}
11281106

1129-
/// A pattern variable.
1130-
///
1131-
/// Clients may not extend, implement or mix-in this class.
1132-
@Deprecated('Use PatternVariableFragment and PatternVariableElement2 instead')
1133-
abstract class PatternVariableElement implements LocalVariableElement {
1134-
/// The variable in which this variable joins with other pattern variables
1135-
/// with the same name, in a logical-or pattern, or shared case scope.
1136-
JoinPatternVariableElement? get join;
1137-
}
1138-
11391107
/// A prefix used to import one or more libraries into another library.
11401108
///
11411109
/// Clients may not extend, implement or mix-in this class.

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,7 @@ mixin AugmentableFragment on ElementImpl {
9090
}
9191

9292
class BindPatternVariableElementImpl extends PatternVariableElementImpl
93-
implements
94-
// ignore: deprecated_member_use_from_same_package,analyzer_use_new_elements
95-
BindPatternVariableElement,
96-
BindPatternVariableFragment {
93+
implements BindPatternVariableFragment {
9794
final DeclaredVariablePatternImpl node;
9895

9996
/// This flag is set to `true` if this variable clashes with another
@@ -6326,11 +6323,8 @@ abstract class InterfaceElementImpl2 extends InstanceElementImpl2
63266323
}
63276324

63286325
class JoinPatternVariableElementImpl extends PatternVariableElementImpl
6329-
implements
6330-
// ignore: deprecated_member_use_from_same_package,analyzer_use_new_elements
6331-
JoinPatternVariableElement,
6332-
JoinPatternVariableFragment {
6333-
@override
6326+
implements JoinPatternVariableFragment {
6327+
/// The variables that join into this variable.
63346328
final List<PatternVariableElementImpl> variables;
63356329

63366330
shared.JoinedPatternVariableInconsistency inconsistency;
@@ -8942,11 +8936,9 @@ class PartElementImpl extends _ExistingElementImpl
89428936
}
89438937

89448938
class PatternVariableElementImpl extends LocalVariableElementImpl
8945-
implements
8946-
// ignore: deprecated_member_use_from_same_package,analyzer_use_new_elements
8947-
PatternVariableElement,
8948-
PatternVariableFragment {
8949-
@override
8939+
implements PatternVariableFragment {
8940+
/// The variable in which this variable joins with other pattern variables
8941+
/// with the same name, in a logical-or pattern, or shared case scope.
89508942
JoinPatternVariableElementImpl? join;
89518943

89528944
/// This flag is set to `true` while we are visiting the [WhenClause] of

0 commit comments

Comments
 (0)