summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ast/ast.cpp1
-rw-r--r--src/convert/typecheck_expr.cpp6
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());