title: PLS-00540: Object not supported in this context while trying to compile package specification
body: <p>I'm trying to compile a package specification. I would like to include some type definitions and declare a function:</p>
  
  <pre><code>TYPE col_type AS OBJECT (
  col_name VARCHAR2(50)
  );
  
  TYPE col_sub_type
  IS TABLE OF
  col_type;
  
  FUNCTION get_col_tab RETURN col_sub_type;
  </code></pre>
  
  <p>And finally, the <code>get_col_tab</code> function:</p>
  
  <pre><code>FUNCTION get_col_tab RETURN col_sub_type AS
  l_type  col_sub_type := col_sub_type();
  BEGIN
  FOR i IN (SELECT DISTINCT TABLE_NAME t_name FROM ALL_TAB_COLUMNS WHERE TABLE_NAME = 'TABLE_1') LOOP
  l_type.extend;
  l_type(l_type.last) := col_type(i.t_name);
  END LOOP;
  RETURN l_type;
  END;
  </code></pre>
  
  <p>But when compiling the package specification I get the following error:</p>
  
  <blockquote>
    <p>PLS-00540: Object not supported in this context</p>
  </blockquote>
  
  <p>As I understand I cannot use a type <code>OBJECT</code> in package specification. Is there a workaround or another way to do this?</p>
  
  <p>Thanks in advance.</p>