Index: src/SymTab/Demangle.cc
===================================================================
--- src/SymTab/Demangle.cc	(revision 72b360520e3047a360ae36e1c5396e10eb3eb9c2)
+++ src/SymTab/Demangle.cc	(revision efa8b6af448772bbca87a872f6a73ea6b7d0f740)
@@ -354,4 +354,5 @@
 				Type * parseUnion(Type::Qualifiers tq);
 				Type * parseEnum(Type::Qualifiers tq);
+				Type * parseType(Type::Qualifiers tq);
 
 				Type * parseType();
@@ -390,4 +391,5 @@
 				parsers.emplace_back(Encoding::union_t, [this](Type::Qualifiers tq) { return parseUnion(tq); });
 				parsers.emplace_back(Encoding::enum_t, [this](Type::Qualifiers tq) { return parseEnum(tq); });
+				parsers.emplace_back(Encoding::type, [this](Type::Qualifiers tq) { return parseType(tq); });
 				parsers.emplace_back(Encoding::zero, [this](Type::Qualifiers tq) { return new ZeroType(tq); });
 				parsers.emplace_back(Encoding::one, [this](Type::Qualifiers tq) { return new OneType(tq); });
@@ -396,10 +398,12 @@
 			bool StringView::extractNumber(size_t & out) {
 				std::stringstream numss;
+				if (idx >= str.size()) return false;
 				while (isdigit(str[idx])) {
 					numss << str[idx];
 					++idx;
-					if (idx >= str.size()) return false;
+					if (idx == str.size()) break;
 				}
 				if (! (numss >> out)) return false;
+				PRINT( std::cerr << "extractNumber success: " << out << std::endl; )
 				return true;
 			}
@@ -408,7 +412,8 @@
 				size_t len;
 				if (! extractNumber(len)) return false;
-				if (idx+len >= str.size()) return false;
+				if (idx+len > str.size()) return false;
 				out = str.substr(idx, len);
 				idx += len;
+				PRINT( std::cerr << "extractName success: " << out << std::endl; )
 				return true;
 			}
@@ -525,4 +530,12 @@
 				if (! extractName(name)) return nullptr;
 				return new EnumInstType(tq, name);
+			}
+
+			Type * StringView::parseType(Type::Qualifiers tq) {
+				PRINT( std::cerr << "type..." << std::endl; )
+				std::string name;
+				if (! extractName(name)) return nullptr;
+				PRINT( std::cerr << "typename..." << name << std::endl; )
+				return new TypeInstType(tq, name, false);
 			}
 
