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 {
3939 properties['nameOffset' ] = element.nameOffset;
4040 if (element is ClassElement ) {
4141 properties['hasNonFinalField' ] = element.hasNonFinalField;
42- properties['hasReferenceToSuper' ] = element.hasReferenceToSuper;
4342 properties['hasStaticMember' ] = element.hasStaticMember;
4443 properties['interfaces' ] = element.interfaces;
4544 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+
15## 0.39.10
26* Restored the default constructor in internal ` SummaryBuilder ` ,
37 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
8282 /// hence cannot be used as a mixin), or `false` if this element represents a
8383 /// mixin, even if the mixin has a reference to `super` , because it is allowed
8484 /// to be used as a mixin.
85+ @Deprecated ('It was used internally, should not be part of API' )
8586 bool get hasReferenceToSuper;
8687
8788 /// 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
685685 return definingClass != null && ! definingClass.isDartCoreObject;
686686 }
687687
688+ @Deprecated ('It was used internally, should not be part of API' )
688689 @override
689690 bool get hasReferenceToSuper => hasModifier (Modifier .REFERENCES_SUPER );
690691
691692 /// Set whether this class references 'super'.
693+ /// TODO(scheglov) Remove it.
692694 set hasReferenceToSuper (bool isReferencedSuper) {
693695 setModifier (Modifier .REFERENCES_SUPER , isReferencedSuper);
694696 }
@@ -782,9 +784,6 @@ class ClassElementImpl extends AbstractClassElementImpl
782784
783785 @override
784786 bool get isValidMixin {
785- if (hasReferenceToSuper) {
786- return false ;
787- }
788787 if (! supertype.isDartCoreObject) {
789788 return false ;
790789 }
@@ -3402,6 +3401,7 @@ class EnumElementImpl extends AbstractClassElementImpl {
34023401 @override
34033402 bool get hasNonFinalField => false ;
34043403
3404+ @Deprecated ('It was used internally, should not be part of API' )
34053405 @override
34063406 bool get hasReferenceToSuper => false ;
34073407
Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ class ResolutionVisitor extends RecursiveAstVisitor<void> {
8585
8686 /// The flag specifying if currently visited class references 'super'
8787 /// expression.
88- /// TODO(scheglov) put into summary
8988 bool _hasReferenceToSuper = false ;
9089
9190 factory ResolutionVisitor ({
Original file line number Diff line number Diff line change @@ -652,6 +652,7 @@ void main() {
652652 );
653653 }
654654
655+ @Deprecated ('It was used internally, should not be part of API' )
655656 test_hasReferenceToSuper () async {
656657 await assertNoErrorsInCode (r'''
657658class A {}
@@ -860,7 +861,7 @@ class C = Object with A;''');
860861 expect (a.isValidMixin, isTrue);
861862 }
862863
863- test_isValidMixin_super () async {
864+ test_isValidMixin_super_toString () async {
864865 await assertNoErrorsInCode (r'''
865866class A {
866867 toString() {
@@ -871,7 +872,7 @@ class C = Object with A;''');
871872 verifyTestResolved ();
872873
873874 var a = findElement.class_ ('A' );
874- expect (a.isValidMixin, isFalse );
875+ expect (a.isValidMixin, isTrue );
875876 }
876877
877878 test_isValidMixin_valid () async {
You can’t perform that action at this time.
0 commit comments