def _unify_generic(self, t1: GenericMeta, t2: GenericMeta):
"""Unify two generic-typed nodes."""
if _gorg(t1) is not _gorg(t2):
raise TypeInferenceError('bad unify')
elif t1.__args__ is not None and t2.__args__ is not None:
for a1, a2 in zip(t1.__args__, t2.__args__):
self.unify(a1, a2)
评论列表
文章目录