summaryrefslogtreecommitdiff
path: root/src/ast/path.hpp
diff options
context:
space:
mode:
authorJohn Hodge (sonata) <tpg@mutabah.net>2015-01-20 18:28:44 +0800
committerJohn Hodge (sonata) <tpg@mutabah.net>2015-01-20 18:28:44 +0800
commitdcb89ac3be47b79af382fff4b10a25004072fe98 (patch)
treee8e21e44b873c45057b3b359aa256058d63685a9 /src/ast/path.hpp
parentf5bd71bdf7a36fddf52462b49c04fdcce2a3926a (diff)
downloadmrust-dcb89ac3be47b79af382fff4b10a25004072fe98.tar.gz
Fiddling with type resoltion, spotted a hole in path resolve
Diffstat (limited to 'src/ast/path.hpp')
-rw-r--r--src/ast/path.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp
index 01c8ed03..02e028d7 100644
--- a/src/ast/path.hpp
+++ b/src/ast/path.hpp
@@ -160,9 +160,14 @@ public:
_(Module, module, MODULE)
_(Trait, trait, TRAIT)
_(Struct, struct, STRUCT)
- _(Enum, enum, ENUM)
+ //_(Enum, enum, ENUM)
_(Function, func, FUNCTION)
+ _(Static, static, STATIC)
#undef _
+ const Enum& bound_enum() const {
+ assert(m_binding_type == ENUM || m_binding_type == ENUM_VAR);
+ return *m_binding.enum_;
+ }
::std::vector<PathNode>& nodes() { return m_nodes; }
const ::std::vector<PathNode>& nodes() const { return m_nodes; }