diff options
Diffstat (limited to 'src/convert/resolve.cpp')
-rw-r--r-- | src/convert/resolve.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/convert/resolve.cpp b/src/convert/resolve.cpp index b20df695..ff3aa05a 100644 --- a/src/convert/resolve.cpp +++ b/src/convert/resolve.cpp @@ -1181,12 +1181,19 @@ void CPathResolver::handle_path_ufcs(const Span& span, AST::Path& path, CASTIter DEBUG("Searching for inherent impls on " << *info.type);
bool found = m_crate.find_inherent_impls( *info.type, [&](const AST::Impl& impl, ::std::vector<TypeRef> _) -> bool {
DEBUG("Searching impl " << impl);
- for( const auto& fcn : impl.functions() )
+ for( const auto& i : impl.items() )
{
- if( fcn.name == name ) {
- path.bind_function(fcn.data, path.nodes()[0].args());
- info.trait = make_unique_ptr( TypeRef(TypeRef::TagInvalid(), span) );
- return true;
+ if( i.name == name ) {
+ TU_MATCH_DEF(AST::Item, (i.data), (e),
+ (
+ // Ignore?
+ ),
+ (Function,
+ path.bind_function(e.e, path.nodes()[0].args());
+ info.trait = make_unique_ptr( TypeRef(TypeRef::TagInvalid(), span) );
+ return true;
+ )
+ )
}
}
return false;
|