================
@@ -2341,30 +2830,32 @@ class Type(Structure):
 
     _fields_ = [("_kind_id", c_int), ("data", c_void_p * 2)]
 
+    _tu: TranslationUnit
+
     @property
-    def kind(self):
+    def kind(self) -> TypeKind:
         """Return the kind of this type."""
         return TypeKind.from_id(self._kind_id)
 
-    def argument_types(self):
+    def argument_types(self) -> NoSliceSequence[Type]:
         """Retrieve a container for the non-variadic arguments for this type.
 
         The returned object is iterable and indexable. Each item in the
         container is a Type instance.
         """
 
-        class ArgumentsIterator(collections_abc.Sequence):
-            def __init__(self, parent):
+        class ArgumentsIterator:
----------------
DeinAlptraum wrote:

Removed the inheritance here, since ArgumentsIterator doesn't actually 
implement everything needed by the protocol anyway (which is precisely why I 
had to add the `NoSliceSequence` protocol)

https://github.com/llvm/llvm-project/pull/78114
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to