diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-11-23 12:01:40 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-11-23 12:01:40 +0800 |
commit | 87df981564afc3debfe5b11842f375bfae5900ff (patch) | |
tree | 803047f1d90bf6b01ac6445bdb9c7e592d81466f /src/resolve/absolute.cpp | |
parent | fb2b1202e916e2e3f406d03005237b1d2447269f (diff) | |
download | mrust-87df981564afc3debfe5b11842f375bfae5900ff.tar.gz |
HIR - Restructure resolve to replace `Self` type later in processing
Diffstat (limited to 'src/resolve/absolute.cpp')
-rw-r--r-- | src/resolve/absolute.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/resolve/absolute.cpp b/src/resolve/absolute.cpp index 86bc47c7..6cc7c615 100644 --- a/src/resolve/absolute.cpp +++ b/src/resolve/absolute.cpp @@ -192,7 +192,7 @@ namespace ( ), (ConcreteSelf, - if( e ) { + if( false && e ) { return e->clone(); } else { @@ -460,7 +460,15 @@ namespace (ConcreteSelf, DEBUG("- ConcreteSelf"); if( ( mode == LookupMode::Type || mode == LookupMode::Namespace ) && name == "Self" ) { - return ::AST::Path( ::AST::Path::TagUfcs(), e->clone(), ::AST::Path(), ::std::vector< ::AST::PathNode>() ); + // TODO: Want to return the type if handling a struct literal + if( false ) { + return ::AST::Path( ::AST::Path::TagUfcs(), e->clone(), ::AST::Path(), ::std::vector< ::AST::PathNode>() ); + } + else { + ::AST::Path rv(name); + rv.bind_variable(0xFFFF); + return rv; + } } ), (VarBlock, |