summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-28 20:24:31 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-28 20:24:31 +0800
commitf749f53986f7a0a78949d62d7ee39905899c61d5 (patch)
treec0e975c05da3d887ef8086aca17e345d3d37bef7 /src/resolve
parent47026f277478ffbadb5daa2d85b4600cbec52c9e (diff)
downloadmrust-f749f53986f7a0a78949d62d7ee39905899c61d5.tar.gz
Resolve Absolute - Fix incorrect lookup mode for MaybeBind
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/absolute.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve/absolute.cpp b/src/resolve/absolute.cpp
index 01b18c00..a47350b4 100644
--- a/src/resolve/absolute.cpp
+++ b/src/resolve/absolute.cpp
@@ -1682,9 +1682,9 @@ void Resolve_Absolute_Pattern(Context& context, bool allow_refutable, ::AST::Pa
if( allow_refutable ) {
auto name = mv$( e.name );
// Attempt to resolve the name in the current namespace, and if it fails, it's a binding
- auto p = context.lookup_opt( name, Context::LookupMode::Constant );
+ auto p = context.lookup_opt( name, Context::LookupMode::Pattern );
if( p.is_valid() ) {
- Resolve_Absolute_Path(context, pat.span(), Context::LookupMode::Constant, p);
+ Resolve_Absolute_Path(context, pat.span(), Context::LookupMode::Pattern, p);
pat = ::AST::Pattern(::AST::Pattern::TagValue(), ::AST::Pattern::Value::make_Named(mv$(p)));
DEBUG("MaybeBind resolved to " << pat);
}