Oracle Error PLS-00318: type “string” is malformed because it is a non-REF mutually recursive type

Oracle Error Message

PLS-00318: type “string” is malformed because it is a non-REF mutually recursive type

Reason for the Error

A type-declaration such as: — a non-REF recursive type, for example: type t is record (a t); or — non-REF mutually dependent types, for example: type t1; type t2 is record (a t1); type t1 is record (a t2); was performed. In these examples, the type is malformed because it participates in a mutually recursive non-REF relationship with itself and possibly other types.

Solution

Use another type to remove the recursion.