diff options
author | John Hodge <tpg@mutabah.net> | 2016-06-10 21:07:20 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-06-10 21:07:20 +0800 |
commit | c5f53bf6e0c85899ff6498c8150e621f4d0ef1c8 (patch) | |
tree | 3ba2e87b9ace4c03b34bb4078eda8478b4510b41 /src/hir/type.hpp | |
parent | 3690d264b04f45b54ee6398ab403ff143cab77f5 (diff) | |
download | mrust-c5f53bf6e0c85899ff6498c8150e621f4d0ef1c8.tar.gz |
HIR Typecheck - Rework ops traits handling a bit
Diffstat (limited to 'src/hir/type.hpp')
-rw-r--r-- | src/hir/type.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hir/type.hpp b/src/hir/type.hpp index 3ee4e65c..b09d3f40 100644 --- a/src/hir/type.hpp +++ b/src/hir/type.hpp @@ -12,9 +12,11 @@ namespace HIR { class Struct; class Enum; +struct ExprNode_Closure; class TypeRef; -struct ExprNode_Closure; + +typedef ::std::function<void(unsigned int, const ::HIR::TypeRef&)> t_cb_match_generics; enum class InferClass { @@ -176,6 +178,8 @@ public: // Raises a bug against `sp` if there is a form mismatch or `this` has an infer void match_generics(const Span& sp, const ::HIR::TypeRef& x, t_cb_resolve_type resolve_placeholder, ::std::function<void(unsigned int, const ::HIR::TypeRef&)> callback) const; + bool match_test_generics(const Span& sp, const ::HIR::TypeRef& x, t_cb_resolve_type resolve_placeholder, ::std::function<void(unsigned int, const ::HIR::TypeRef&)> callback) const; + // Compares this type with another, using `resolve_placeholder` to get replacements for generics/infers in `x` Compare compare_with_paceholders(const Span& sp, const ::HIR::TypeRef& x, t_cb_resolve_type resolve_placeholder) const; }; |