In 11g, you need the types separately
SQL> create or replace type myobj as object ( x int, y int );
2 /
Type created.
SQL> create or replace type mylist is table of myobj;
2 /
Type created.
SQL>
SQL> create or replace package pkg is
2 function f return mylist pipelined;
3 end;
4 /
Package created.
SQL> create or replace
2 package body pkg is
3 function f return mylist pipelined is
4 begin
5 for i in 1 .. 10 loop
6 pipe row ( myobj (i,i+1));
7 end loop;
8 end;
9 end;
10 /
Package body created.
SQL>
SQL> select * from table(pkg.f);
X Y
---------- ----------
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
10 rows selected.
SQL>
SQL>
In 12c, this restriction is lifted.