de DEREF moet in een SQL-instructie staan: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28371/adobjbas.htm#i463707
dit werkt
CREATE OR REPLACE TYPE BODY PIZ AS
MEMBER PROCEDURE DISPLAY_LOCS IS
x varchar2(30) ;
BEGIN
FOR IDX IN SELF.LOCS.FIRST..SELF.LOCS.LAST LOOP
select DEREF(SELF.LOCS(IDX)).GET_NAME() into x from dual ;
DBMS_OUTPUT.PUT_LINE(x); --this is the line that generates the error
END LOOP;
END;
END;
/
mooie testcase om te reproduceren!