From b76811a7d80cf6998dfd0bbf2415a723df6a2002 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 27 Oct 2019 12:24:31 +0800 Subject: HIR - Restore change from 0992c4af5242fc95e8cc028c5af7fb86424e624c (lost in split to `hir_ops.cpp`) --- src/hir/hir_ops.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/hir/hir_ops.cpp b/src/hir/hir_ops.cpp index f187bafe..3a33d5cb 100644 --- a/src/hir/hir_ops.cpp +++ b/src/hir/hir_ops.cpp @@ -324,10 +324,12 @@ namespace { TODO(sp, "ErasedType - " << left); ), (Function, - TU_IFLET(::HIR::TypeRef::Data, right.m_data, Function, re, + if(/*const auto* re =*/ right.m_data.opt_Function() ) { + if( left == right ) + return ::OrdEqual; TODO(sp, "Function - " << left << " vs " << right); - //return typelist_ord_specific(sp, le.arg_types, re.arg_types); - ) + //return typelist_ord_specific(sp, le.arg_types, re->arg_types); + } else { BUG(sp, "Mismatched types - " << left << " and " << right); } -- cgit v1.2.3