DEREF måste finnas i en SQL-sats: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28371/adobjbas.htm#i463707
det här fungerar
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;
/
trevligt testfall att reproducera!