It is a matter of finding the correct level of magic parentheses.
create index on test (((i).id));
The outer layer are always needed for creating indexes. The middle layer are needed because you are indexing an expression, not a column. And the inner layer is needed because, well, that is just how udt works.