@__haoyang__/erwin
    Preparing search index...

    Function ghost_member_of_member_inside_struct_instantiation

    • Struct declarations may contain declarations that are qualified by storage locations (e.g., memory, storage, calldata). When creating a struct instance of this kind, we have to assign a storage location to the instance and vicariously to its members. Therefore, two identifiers of the same member of a struct declaration may have different storage locations. In this case, we cannot easily say the identifier's storage location restrains the member's storage location. We need to create a ghost member of the member inside the struct instance to represent the member's storage location in this case and let the identifier's storage location restrain the ghost member's storage location.

      Parameters

      • member_id: number

        The ID of the member of a struct declaration

      • struct_instantiation_id: number

        The ID of the struct instantiation, e.g., a new-struct expression, or an identifier of a struct instance declaration

      Returns number

      The ghost member ID of the member inside the struct instantiation