diff options
author | John Hodge <tpg@mutabah.net> | 2016-06-07 17:42:27 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-06-07 17:42:27 +0800 |
commit | 6b11184b3335331b2e28b5e6cce5525f501e23ce (patch) | |
tree | 8228ad86a17d69c7e36eb90f7e3b93074cba9d3a /src/hir/type.hpp | |
parent | 2d7d7d8571a788ca43439a5d75df818eaa8dd5d3 (diff) | |
download | mrust-6b11184b3335331b2e28b5e6cce5525f501e23ce.tar.gz |
HIR Typecheck - Successful inferrence of literals (no i32 default yet)
Diffstat (limited to 'src/hir/type.hpp')
-rw-r--r-- | src/hir/type.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hir/type.hpp b/src/hir/type.hpp index 01254270..75cf4485 100644 --- a/src/hir/type.hpp +++ b/src/hir/type.hpp @@ -169,6 +169,14 @@ public: // Match generics in `this` with types from `x` // 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, ::std::function<void(unsigned int, const ::HIR::TypeRef&)> callback) const; + + enum Compare { + Equal, + Fuzzy, + Unequal, + }; + // 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, ::std::function<const ::HIR::TypeRef&(const ::HIR::TypeRef&)> resolve_placeholder) const; }; extern ::std::ostream& operator<<(::std::ostream& os, const ::HIR::TypeRef& ty); |