diff options
author | John Hodge <tpg@mutabah.net> | 2016-05-01 20:44:57 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-05-01 20:44:57 +0800 |
commit | 8863535ad350137189fcafce1343765500bc445a (patch) | |
tree | f13c723f1377599ac867d56c721ab89832607f97 /src/resolve/index.cpp | |
parent | 58036edfc5e36e9463147b6984c99a5094882881 (diff) | |
download | mrust-8863535ad350137189fcafce1343765500bc445a.tar.gz |
Fix handling of tuple/unit structs
Diffstat (limited to 'src/resolve/index.cpp')
-rw-r--r-- | src/resolve/index.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolve/index.cpp b/src/resolve/index.cpp index b5fdbf33..e905de26 100644 --- a/src/resolve/index.cpp +++ b/src/resolve/index.cpp @@ -107,6 +107,10 @@ void Resolve_Index_Module_Base(AST::Module& mod) (Struct, _add_item_type(mod, i.name, i.is_pub, b.clone()); + // - If the struct is a tuple-like struct, it presents in the value namespace + if( e.struct_->m_data.is_Tuple() ) { + _add_item_value(mod, i.name, i.is_pub, b.clone()); + } ), (Static , _add_item_value(mod, i.name, i.is_pub, b.clone()); ), (Function, _add_item_value(mod, i.name, i.is_pub, b.clone()); ), |