diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-18 09:37:15 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-18 09:37:15 +0800 |
commit | 048e53fa011bc09ae24bbb0ee3fcb4f8105959f1 (patch) | |
tree | dc757e94d1c34ed3fdbc975e18043402e2870457 /src | |
parent | a53e46b59315ee3c1e4a4b8979f0f98fbf2a41f9 (diff) | |
download | mrust-048e53fa011bc09ae24bbb0ee3fcb4f8105959f1.tar.gz |
Trans Enumerate - Allow enum tuple variant constructors as functions
Diffstat (limited to 'src')
-rw-r--r-- | src/trans/enumerate.cpp | 5 |
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; ) |