summaryrefslogtreecommitdiff
path: root/src/ast
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2019-01-05 15:09:30 +0800
committerJohn Hodge <tpg@ucc.asn.au>2019-01-05 15:09:30 +0800
commit4ead75dea44e61502c8257161ff6b86fcc835adf (patch)
treefa8478f2d58ea6def7976ce9f2225f9ff701a8af /src/ast
parentc0267e165eca49583ac6ba7c3b48ba68ec4eee49 (diff)
downloadmrust-4ead75dea44e61502c8257161ff6b86fcc835adf.tar.gz
Resolve Use - Handle partial shadowing of items/imports
Diffstat (limited to 'src/ast')
-rw-r--r--src/ast/path.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index 89804b61..18ebea49 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -245,6 +245,14 @@ public:
bool has_binding() const {
return !value.is_Unbound() || !type.is_Unbound() || !macro.is_Unbound();
}
+ void merge_from(const Bindings& x) {
+ if(value.is_Unbound())
+ value = x.value.clone();
+ if(type.is_Unbound())
+ type = x.type.clone();
+ if(macro.is_Unbound())
+ macro = x.macro.clone();
+ }
} m_bindings;
virtual ~Path();