Commit f56b6311 authored by Luke Mewburn's avatar Luke Mewburn
Browse files

compat_asn1: handle untagged SEQUENCE fields

parent e88b4a06
Loading
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -227,13 +227,11 @@ class CompatCheck:
        """Convert `container` to dict indexed on tag, value is type."""
        result = {}
        for name, asntype in container.items():
            tagtuple = asntype._tag
            if tagtuple is None:
                self._process_error(
                    f"{repr_type_name(container)} field '{name}' doesn't have a tag",
                )
                continue
            result[tagtuple[0]] = asntype
            if asntype._tag is not None:
                tag = asntype._tag[0]
            else:
                tag = name  # no tag, use the field name
            result[tag] = asntype
        return result

    def _types_already_seen(