@@ -780,16 +780,12 @@ class array_typet:public type_with_subtypet
780780 }
781781
782782 // / The type of the elements of the array.
783- // / This method is preferred over .subtype(),
784- // / which will eventually be deprecated.
785783 const typet &element_type () const
786784 {
787785 return subtype ();
788786 }
789787
790788 // / The type of the elements of the array.
791- // / This method is preferred over .subtype(),
792- // / which will eventually be deprecated.
793789 typet &element_type ()
794790 {
795791 return subtype ();
@@ -822,6 +818,10 @@ class array_typet:public type_with_subtypet
822818 static void check (
823819 const typet &type,
824820 const validation_modet vm = validation_modet::INVARIANT );
821+
822+ protected:
823+ // Use element_type() instead
824+ using type_with_subtypet::subtype;
825825};
826826
827827// / Check whether a reference to a typet is a \ref array_typet.
@@ -1021,23 +1021,23 @@ class vector_typet:public type_with_subtypet
10211021 }
10221022
10231023 // / The type of the elements of the vector.
1024- // / This method is preferred over .subtype(),
1025- // / which will eventually be deprecated.
10261024 const typet &element_type () const
10271025 {
10281026 return subtype ();
10291027 }
10301028
10311029 // / The type of the elements of the vector.
1032- // / This method is preferred over .subtype(),
1033- // / which will eventually be deprecated.
10341030 typet &element_type ()
10351031 {
10361032 return subtype ();
10371033 }
10381034
10391035 const constant_exprt &size () const ;
10401036 constant_exprt &size ();
1037+
1038+ protected:
1039+ // Use element_type() instead
1040+ using type_with_subtypet::subtype;
10411041};
10421042
10431043// / Check whether a reference to a typet is a \ref vector_typet.
0 commit comments