summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ast/ast.cpp8
-rw-r--r--src/convert/typecheck_params.cpp3
2 files changed, 5 insertions, 6 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp
index 58c0a74b..9aa02fe1 100644
--- a/src/ast/ast.cpp
+++ b/src/ast/ast.cpp
@@ -284,10 +284,10 @@ bool Crate::check_impls_wildcard(const Path& trait, const TypeRef& type)
return true;
}
else if( type.is_reference() ) {
- return find_impl(trait, type.sub_types()[0]).is_some();
+ return find_impl(trait, type.sub_types()[0], nullptr);
}
else if( type.is_pointer() ) {
- return find_impl(trait, type.sub_types()[0]).is_some();
+ return find_impl(trait, type.sub_types()[0], nullptr);
}
else if( type.is_type_param() ) {
// TODO: Include an annotation to the TypeParams structure relevant to this type
@@ -310,7 +310,7 @@ bool Crate::check_impls_wildcard(const Path& trait, const TypeRef& type)
fld_ty.resolve_args( resolve_fn );
DEBUG("- Fld '" << fld.name << "' := " << fld.data << " => " << fld_ty);
// TODO: Defer failure until after all fields are processed
- if( !find_impl(trait, fld_ty).is_some() )
+ if( !find_impl(trait, fld_ty, nullptr) )
return false;
}
return true; }
@@ -325,7 +325,7 @@ bool Crate::check_impls_wildcard(const Path& trait, const TypeRef& type)
real_ty.resolve_args( resolve_fn );
DEBUG("- Var '" << var.m_name << "' := " << ty << " => " << real_ty);
// TODO: Defer failure until after all fields are processed
- if( !find_impl(trait, real_ty).is_some() )
+ if( !find_impl(trait, real_ty, nullptr) )
return false;
}
}
diff --git a/src/convert/typecheck_params.cpp b/src/convert/typecheck_params.cpp
index 34061e85..da3cf724 100644
--- a/src/convert/typecheck_params.cpp
+++ b/src/convert/typecheck_params.cpp
@@ -123,8 +123,7 @@ bool CGenericParamChecker::has_impl(const TypeRef& type, const AST::Path& trait)
else
{
// Search all known impls of this trait (TODO: keep a list at the crate level) for a match to this type
- auto i = m_crate.find_impl(trait, type);
- if( i.is_none() ) {
+ if( m_crate.find_impl(trait, type, NULL) == false ) {
DEBUG("- Nope");
return false;
}