title: PLS-00539 and PLS-00538 errors when creating UDT functions
body: <p>I am trying to create a type hierarchy with types using Oracle, but I am getting the errors PLS-00539 and PLS-00538 when creating its functions. </p>
  
  <p>The code I am using to create the types is:</p>
  
  <pre><code>CREATE OR REPLACE TYPE VC_MNumber AS Object (   
    idno NUMBER,
    MEMBER FUNCTION  dimension   RETURN NUMBER ,
    MEMBER FUNCTION typeName RETURN VARCHAR2) NOT INSTANTIABLE NOT FINAL;
  /
  
  DROP TYPE VC_MINTEGER;
  
  CREATE OR REPLACE TYPE VC_MInteger UNDER VC_MNumber (   
    OVERRIDING MEMBER FUNCTION  dimension   RETURN NUMBER ,
    OVERRIDING MEMBER FUNCTION typeName RETURN VARCHAR2);
  /
  
  CREATE OR REPLACE TYPE VC_MReal UNDER VC_MNumber(   
    YDCCoeff NUMBER,
    CbDCCoeff NUMBER,
    CrDCCoeff NUMBER,
    OVERRIDING MEMBER FUNCTION  typeDimension   RETURN NUMBER, 
    OVERRIDING MEMBER FUNCTION typeName RETURN VARCHAR2) FINAL;
  /
  </code></pre>
  
  <p>Everything okay up to this point, but when I try to create the functions:</p>
  
  <pre><code>CREATE OR REPLACE TYPE BODY VC_MReal AS
    OVERRIDING MEMBER FUNCTION typeDimension RETURN NUMBER IS
      var_dimension       number :=  10;
      BEGIN
          RETURN var_dimension;
      END;
     MEMBER FUNCTION typeName RETURN VARCHAR2 IS
      var_typeName        VARCHAR2(400) :=  'VC_MREAL';
      BEGIN
          RETURN var_typeName;
      END;
  END;
  /
  </code></pre>
  
  <p>I get the errors PLS-00539 and PLS-00538. I don't know what I am doing wrong. I'd appreciate a hand on this. Where is the mistake?</p>