summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-01 12:48:51 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-01 12:48:51 +0800
commitbdb0eb302b17e999a322fbb1d0b18c6b25bae78b (patch)
tree005751cb108e2ab6e328f789db9b95ea58800036
parente90c190be7c3f62e666618de9a75ae3da4325763 (diff)
downloadmrust-bdb0eb302b17e999a322fbb1d0b18c6b25bae78b.tar.gz
HIR Typecheck - Use specialisable flag
-rw-r--r--src/hir_typeck/static.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hir_typeck/static.cpp b/src/hir_typeck/static.cpp
index 7b5e5cd8..d987f682 100644
--- a/src/hir_typeck/static.cpp
+++ b/src/hir_typeck/static.cpp
@@ -587,7 +587,12 @@ bool ImplRef::type_is_specializable(const char* name) const
return true;
}
//TODO(Span(), "type_is_specializable - Impl = " << *this << ", Type = " << name);
- return true;
+ auto it = e.impl->m_types.find(name);
+ if( it == e.impl->m_types.end() ) {
+ TODO(Span(), "Handle missing type in " << *this << ", name = " << name);
+ return false;
+ }
+ return it->second.is_specialisable;
),
(BoundedPtr,
return false;