From 8863535ad350137189fcafce1343765500bc445a Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 1 May 2016 20:44:57 +0800 Subject: Fix handling of tuple/unit structs --- src/resolve/index.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/resolve/index.cpp') 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()); ), -- cgit v1.2.3