File tree Expand file tree Collapse file tree 6 files changed +11
-7
lines changed
analysis_server/lib/src/status Expand file tree Collapse file tree 6 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ class ElementWriter extends GeneralizingElementVisitor with TreeWriter {
39
39
properties['nameOffset' ] = element.nameOffset;
40
40
if (element is ClassElement ) {
41
41
properties['hasNonFinalField' ] = element.hasNonFinalField;
42
- properties['hasReferenceToSuper' ] = element.hasReferenceToSuper;
43
42
properties['hasStaticMember' ] = element.hasStaticMember;
44
43
properties['interfaces' ] = element.interfaces;
45
44
properties['isAbstract' ] = element.isAbstract;
Original file line number Diff line number Diff line change
1
+ ## 0.39.11-dev
2
+ * Deprecated ` ClassElement.hasReferenceToSuper ` .
3
+ It was used internally, should not be part of API.
4
+
1
5
## 0.39.10
2
6
* Restored the default constructor in internal ` SummaryBuilder ` ,
3
7
and the ` featureSet ` named parameter in ` build ` , for ` build_resolvers `
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ abstract class ClassElement
82
82
/// hence cannot be used as a mixin), or `false` if this element represents a
83
83
/// mixin, even if the mixin has a reference to `super` , because it is allowed
84
84
/// to be used as a mixin.
85
+ @Deprecated ('It was used internally, should not be part of API' )
85
86
bool get hasReferenceToSuper;
86
87
87
88
/// Return `true` if this class declares a static member.
Original file line number Diff line number Diff line change @@ -685,10 +685,12 @@ class ClassElementImpl extends AbstractClassElementImpl
685
685
return definingClass != null && ! definingClass.isDartCoreObject;
686
686
}
687
687
688
+ @Deprecated ('It was used internally, should not be part of API' )
688
689
@override
689
690
bool get hasReferenceToSuper => hasModifier (Modifier .REFERENCES_SUPER );
690
691
691
692
/// Set whether this class references 'super'.
693
+ /// TODO(scheglov) Remove it.
692
694
set hasReferenceToSuper (bool isReferencedSuper) {
693
695
setModifier (Modifier .REFERENCES_SUPER , isReferencedSuper);
694
696
}
@@ -782,9 +784,6 @@ class ClassElementImpl extends AbstractClassElementImpl
782
784
783
785
@override
784
786
bool get isValidMixin {
785
- if (hasReferenceToSuper) {
786
- return false ;
787
- }
788
787
if (! supertype.isDartCoreObject) {
789
788
return false ;
790
789
}
@@ -3402,6 +3401,7 @@ class EnumElementImpl extends AbstractClassElementImpl {
3402
3401
@override
3403
3402
bool get hasNonFinalField => false ;
3404
3403
3404
+ @Deprecated ('It was used internally, should not be part of API' )
3405
3405
@override
3406
3406
bool get hasReferenceToSuper => false ;
3407
3407
Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ class ResolutionVisitor extends RecursiveAstVisitor<void> {
85
85
86
86
/// The flag specifying if currently visited class references 'super'
87
87
/// expression.
88
- /// TODO(scheglov) put into summary
89
88
bool _hasReferenceToSuper = false ;
90
89
91
90
factory ResolutionVisitor ({
Original file line number Diff line number Diff line change @@ -652,6 +652,7 @@ void main() {
652
652
);
653
653
}
654
654
655
+ @Deprecated ('It was used internally, should not be part of API' )
655
656
test_hasReferenceToSuper () async {
656
657
await assertNoErrorsInCode (r'''
657
658
class A {}
@@ -860,7 +861,7 @@ class C = Object with A;''');
860
861
expect (a.isValidMixin, isTrue);
861
862
}
862
863
863
- test_isValidMixin_super () async {
864
+ test_isValidMixin_super_toString () async {
864
865
await assertNoErrorsInCode (r'''
865
866
class A {
866
867
toString() {
@@ -871,7 +872,7 @@ class C = Object with A;''');
871
872
verifyTestResolved ();
872
873
873
874
var a = findElement.class_ ('A' );
874
- expect (a.isValidMixin, isFalse );
875
+ expect (a.isValidMixin, isTrue );
875
876
}
876
877
877
878
test_isValidMixin_valid () async {
You can’t perform that action at this time.
0 commit comments