mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
@@ -1829,7 +1829,7 @@ class ASTTypeUsing(ASTBase):
|
||||
self.type = type
|
||||
|
||||
def get_id_v1(self, objectType=None, symbol=None):
|
||||
return None
|
||||
raise NoOldIdError()
|
||||
|
||||
def get_id_v2(self, objectType=None, symbol=None):
|
||||
return symbol.get_full_nested_name().get_id_v2()
|
||||
@@ -3198,11 +3198,13 @@ class DefinitionParser(object):
|
||||
|
||||
if objectType == 'type':
|
||||
error = None
|
||||
pos = self.pos
|
||||
try:
|
||||
if not templatePrefix:
|
||||
declaration = self._parse_type(named=True, outer='type')
|
||||
except DefinitionError as e:
|
||||
error = e.description
|
||||
self.pos = pos
|
||||
try:
|
||||
if not declaration:
|
||||
declaration = self._parse_type_using()
|
||||
|
||||
@@ -246,6 +246,8 @@ def test_type_definitions():
|
||||
check('enumerator', 'A = std::numeric_limits<unsigned long>::max()',
|
||||
None, "1A")
|
||||
|
||||
check('type', 'A = B', None, '1A')
|
||||
|
||||
|
||||
def test_fundamental_types():
|
||||
# see http://en.cppreference.com/w/cpp/language/types
|
||||
|
||||
Reference in New Issue
Block a user