Declaration not valid in TYPE scope: <name>

You declared one of the following as a member of a user-defined data type:

  • An object reference variable
  • A list variable
  • A dynamic array variable

Object reference variables, list variables, and dynamic array variables are not valid members of a user-defined data type.

Remove the invalid member declaration.