summaryrefslogtreecommitdiff
path: root/src/tools/execution-results.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/execution-results.h')
-rw-r--r--src/tools/execution-results.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/tools/execution-results.h b/src/tools/execution-results.h
index 5f2e772f0..10e243287 100644
--- a/src/tools/execution-results.h
+++ b/src/tools/execution-results.h
@@ -151,9 +151,14 @@ struct ExecutionResults {
bool areEqual(Literal a, Literal b) {
// We allow nulls to have different types (as they compare equal regardless)
// but anything else must have an identical type.
- if (a.type != b.type && !(a.isNull() && b.isNull())) {
- std::cout << "types not identical! " << a << " != " << b << '\n';
- return false;
+ // We cannot do this in nominal typing, however, as different modules will
+ // have different types in general. We could perhaps compare the entire
+ // graph structurally TODO
+ if (getTypeSystem() != TypeSystem::Nominal) {
+ if (a.type != b.type && !(a.isNull() && b.isNull())) {
+ std::cout << "types not identical! " << a << " != " << b << '\n';
+ return false;
+ }
}
if (a.type.isRef()) {
// Don't compare references - only their types. There are several issues