diff options
author | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-22 15:42:02 +0800 |
---|---|---|
committer | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-22 15:42:02 +0800 |
commit | 1febf19e71549e622420f50f25099ba3005a1133 (patch) | |
tree | c14a4c4f6632509c227accaeecb9f773d4e8aad4 /src | |
parent | ad85a9a2a260a0ff5744c0573f679984de622b74 (diff) | |
download | mrust-1febf19e71549e622420f50f25099ba3005a1133.tar.gz |
(minor) Comment update
Diffstat (limited to 'src')
-rw-r--r-- | src/ast/ast.cpp | 1 | ||||
-rw-r--r-- | src/convert/typecheck_expr.cpp | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index a5af04f5..b8de6d4c 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -107,6 +107,7 @@ const Module& Crate::get_root_module(const ::std::string& name) const { Impl& Crate::find_impl(const TypeRef& trait, const TypeRef& type)
{
+ // TODO: Support autoderef here?
throw ParseError::Generic( FMT("TODO: Lookup impl of " << trait << " for type " << type));
}
diff --git a/src/convert/typecheck_expr.cpp b/src/convert/typecheck_expr.cpp index b5ee6e0d..4fa62fe2 100644 --- a/src/convert/typecheck_expr.cpp +++ b/src/convert/typecheck_expr.cpp @@ -411,14 +411,12 @@ void CTC_NodeVisitor::visit(AST::ExprNode_CallMethod& node) } else { + // Replace generic references in 'type' (copying the type) with + // '_: Bounds' (allowing method lookup to succeed) TypeRef ltype = type; - DEBUG("Resolving args in " << ltype); ltype.resolve_args( [&](const char* name) { - DEBUG("- Looking up " << name); return m_tc.get_type_param(name); } ); - // TODO: Replace generic references in 'type' (copying the type) with - // '_: Bounds' (allowing method lookup to succeed) // - Search for a method on this type // TODO: Requires passing knowledge of in-scope traits (or trying traits) AST::Function& fcn = m_tc.m_crate.lookup_method(ltype, node.m_method.name().c_str()); |