diff options
author | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-20 21:30:26 +0800 |
---|---|---|
committer | John Hodge (sonata) <tpg@mutabah.net> | 2015-01-20 21:30:26 +0800 |
commit | 2b9a03f6b71446dceb12f5d097f066e3c9354210 (patch) | |
tree | 4fb6f405b20aa52f161c80c5e6d994d48a574e1f /src/ast/path.hpp | |
parent | dcb89ac3be47b79af382fff4b10a25004072fe98 (diff) | |
download | mrust-2b9a03f6b71446dceb12f5d097f066e3c9354210.tar.gz |
Type merging hacked in
Diffstat (limited to 'src/ast/path.hpp')
-rw-r--r-- | src/ast/path.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ast/path.hpp b/src/ast/path.hpp index 02e028d7..4576ceec 100644 --- a/src/ast/path.hpp +++ b/src/ast/path.hpp @@ -165,9 +165,13 @@ public: _(Static, static, STATIC) #undef _ const Enum& bound_enum() const { - assert(m_binding_type == ENUM || m_binding_type == ENUM_VAR); + assert(m_binding_type == ENUM || m_binding_type == ENUM_VAR); // Kinda evil, given that it has its own union entry return *m_binding.enum_; } + const unsigned int bound_idx() const { + assert(m_binding_type == ENUM_VAR); + return m_binding.enumvar.idx; + } ::std::vector<PathNode>& nodes() { return m_nodes; } const ::std::vector<PathNode>& nodes() const { return m_nodes; } |