use correct resolver for expressions

This commit is contained in:
Aleksey Kladov 2019-04-11 16:51:30 +03:00
parent ebb0c377f0
commit a347208bb2

View File

@ -274,9 +274,7 @@ impl SourceAnalyzer {
None
});
SourceAnalyzer {
resolver: def_with_body
.map(|it| it.resolver(db))
.unwrap_or_else(|| resolver_for_node(db, file_id, node)),
resolver: resolver_for_node(db, file_id, node),
body_source_map: def_with_body.map(|it| it.body_source_map(db)),
infer: def_with_body.map(|it| it.infer(db)),
}