checkGroupContains(subType);
}
void checkGroupContains(Type subType) {
if (subType.isPrimitive()) {
throw new InvalidRecordException(subType + " found: expected " + this);
}
List<Type> fields = subType.asGroupType().getFields();
for (Type otherType : fields) {
Type thisType = this.getType(otherType.getName());
thisType.checkContains(otherType);