A lot of types in the schema are needlessly strict - for example CollectionType only allows PrimitiveType or KotlinType as the inner type; UnionType only allows PrimitiveTypes to be unioned.
Part of this is probably to avoid awkwardness ([[Long]] isn't something we can handle yet) but we shouldn't be detecting this at the parsing stage. Unless there's a really good reason for it, we should recurse back to the top level SchemaType production where possible.
(from b/157522096)
A lot of types in the schema are needlessly strict - for example CollectionType only allows PrimitiveType or KotlinType as the inner type; UnionType only allows PrimitiveTypes to be unioned.
Part of this is probably to avoid awkwardness ([[Long]] isn't something we can handle yet) but we shouldn't be detecting this at the parsing stage. Unless there's a really good reason for it, we should recurse back to the top level SchemaType production where possible.