From baee86074a399ebe662f74a9fc98b539dd4f60d1 Mon Sep 17 00:00:00 2001
From: Tim Jammer <tim.jammer@tu-darmstadt.de>
Date: Mon, 29 Apr 2024 13:55:49 +0200
Subject: [PATCH] fix return type

---
 scripts/errors/coll/ParamMatchingType.py | 6 +++---
 scripts/errors/dtypes/DtypeMissmatch.py  | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/errors/coll/ParamMatchingType.py b/scripts/errors/coll/ParamMatchingType.py
index f8757a22a..8a6feabab 100644
--- a/scripts/errors/coll/ParamMatchingType.py
+++ b/scripts/errors/coll/ParamMatchingType.py
@@ -74,7 +74,7 @@ def get_global_missmatch(type_1, type_2, count_1, count_2, func_to_use, comm):
 
         tm.insert_instruction(c, after_instruction=call)
 
-    yield tm
+    return tm
 
 
 def get_correct_case(type_1, count_1, func_to_use, comm):
@@ -115,7 +115,7 @@ def get_correct_case(type_1, count_1, func_to_use, comm):
 
         tm.insert_instruction(c, after_instruction=call)
 
-    yield tm
+    return tm
 
 
 def is_combination_compatible(t1, t2, f):
@@ -187,4 +187,4 @@ class InvalidComErrorColl(ErrorGenerator):
 
             if type_1 not in correct_types_checked:
                 correct_types_checked.add(type_1)
-                yield get_correct_case(type_1, func_to_use, comm)
+                yield get_correct_case(type_1, 1,func_to_use, comm)
diff --git a/scripts/errors/dtypes/DtypeMissmatch.py b/scripts/errors/dtypes/DtypeMissmatch.py
index 67b29189b..c118aeb04 100644
--- a/scripts/errors/dtypes/DtypeMissmatch.py
+++ b/scripts/errors/dtypes/DtypeMissmatch.py
@@ -157,6 +157,8 @@ class DtypeMissmatch(ErrorGenerator):
                                                         datatype=t.lower(),
                                                         communicator=c)]
 
+        #TODO send type A and recv Type B vs send Type B and recv Type A may lead to unnecessary duplicates
+
         # all possible combinations
         combinations_to_use = [(s, r) for s in important_sends for r in important_recvs if
                                is_combination_compatible(s, r)]
-- 
GitLab