Skip to content

panic: NewTypeDecl: fail to complete type mi_block_s: error convert type: unsupported type <nil> #521

Description

@MeteorsLiu

Its source code:

typedef struct mi_block_s {
  _Atomic(mi_encoded_t) next;
} mi_block_t;

AST:
mi_encoded_t:

 "Name": {
          "Name": "mi_encoded_t",
          "_Type": "Ident"
        },
        "Parent": null,
        "Type": {
          "Name": "uintptr_t",
          "_Type": "Ident"
        },
        "_Type": "TypedefDecl"

_Atomic(mi_encoded_t):

createBaseField: ProcessType _Atomic(mi_encoded_t) TypeKind: Atomic      
ProcessType: TypeName: _Atomic(mi_encoded_t) TypeKind: Atomic
ProcessType: Unknown Type TypeName: _Atomic(mi_encoded_t) TypeKind: Atomic
     {
        "Doc": {
          "List": [
            {
              "Text": "// free lists contain blocks\n",
              "_Type": "Comment"
            }
          ],
          "_Type": "CommentGroup"
        },
        "Loc": {
          "File": "/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13/internal/mimalloc/mimalloc/types.h",
          "_Type": "Location"
        },
        "Name": {
          "Name": "mi_block_s",
          "_Type": "Ident"
        },
        "Parent": null,
        "Type": {
          "Fields": {
            "List": [
              {
                "Access": 1,
                "Comment": null,
                "Doc": null,
                "IsStatic": false,
                "Names": [
                  {
                    "Name": "next",
                    "_Type": "Ident"
                  }
                ],
                "Type": null,
                "_Type": "Field"
              }
            ],
            "_Type": "FieldList"
          },
          "Methods": null,
          "Tag": 0,
          "_Type": "RecordType"
        },
        "_Type": "TypeDecl"
      },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions