:13: Discriminator 'kind' must be of enumeration type