summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-18 09:37:15 +0800
committerJohn Hodge <tpg@mutabah.net>2016-12-18 09:37:15 +0800
commit048e53fa011bc09ae24bbb0ee3fcb4f8105959f1 (patch)
treedc757e94d1c34ed3fdbc975e18043402e2870457 /src
parenta53e46b59315ee3c1e4a4b8979f0f98fbf2a41f9 (diff)
downloadmrust-048e53fa011bc09ae24bbb0ee3fcb4f8105959f1.tar.gz
Trans Enumerate - Allow enum tuple variant constructors as functions
Diffstat (limited to 'src')
-rw-r--r--src/trans/enumerate.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/trans/enumerate.cpp b/src/trans/enumerate.cpp
index a94f21e5..294cc228 100644
--- a/src/trans/enumerate.cpp
+++ b/src/trans/enumerate.cpp
@@ -127,6 +127,11 @@ namespace {
(
BUG(sp, "Node " << i << " of path " << path << " wasn't a module");
),
+ (Enum,
+ ASSERT_BUG(sp, i == path.m_components.size() - 2, "Enum found somewhere other than penultimate posiiton in " << path);
+ // TODO: Check that this is a tuple variant
+ return EntPtr::make_AutoGenerate({});
+ ),
(Module,
mod = &e2;
)