summaryrefslogtreecommitdiff
path: root/grc/core/Connection.py
diff options
context:
space:
mode:
authorVolker Schroer <3470424+dl1ksv@users.noreply.github.com>2021-04-05 17:29:02 +0200
committermormj <34754695+mormj@users.noreply.github.com>2021-04-09 10:14:23 -0400
commitd44ee73deeaab86a7cc5820ef62688f291331b88 (patch)
tree4fbcd4879eaf4b2d091642748a639e9afa485bd3 /grc/core/Connection.py
parentc9ebbd857f0bd715080fd997f1c465d8713555b8 (diff)
grc: Check connection types, whether they match
Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
Diffstat (limited to 'grc/core/Connection.py')
-rw-r--r--grc/core/Connection.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/grc/core/Connection.py b/grc/core/Connection.py
index f5a466f246..6fd78a41f1 100644
--- a/grc/core/Connection.py
+++ b/grc/core/Connection.py
@@ -90,6 +90,11 @@ class Connection(Element):
self.add_error_message('No connection known between domains "{}" and "{}"'
''.format(*self.type))
+ source_dtype = self.source_port.dtype
+ sink_dtype = self.sink_port.dtype
+ if source_dtype != sink_dtype:
+ self.add_error_message('Source IO type "{}" does not match sink IO type "{}".'.format(source_dtype, sink_dtype))
+
source_size = self.source_port.item_size
sink_size = self.sink_port.item_size
if source_size != sink_size: