- fix #374: Can't find the correct type if current symbol is member of a class that has constructors.
This commit is contained in:
parent
8ebfeec97d
commit
cbd6559ddc
1
NEWS.md
1
NEWS.md
|
@ -128,6 +128,7 @@ Red Panda C++ Version 2.27
|
|||
- enhancement: Size of icons in the completion popup changes with the editor font size.
|
||||
- change: Completion popup size settings are based on editor's char width/line height.
|
||||
- change: Remove "limit for copy" and "limit for undo" options.
|
||||
- fix: Can't find the correct type if current symbol is member of a class that has constructors.
|
||||
|
||||
Red Panda C++ Version 2.26
|
||||
- enhancement: Code suggestion for embedded std::vectors.
|
||||
|
|
|
@ -2603,6 +2603,8 @@ PStatement CppParser::getTypeDef(const PStatement& statement,
|
|||
|| statement->kind == StatementKind::EnumType
|
||||
|| statement->kind == StatementKind::EnumClassType) {
|
||||
return statement;
|
||||
} else if (statement->kind == StatementKind::Constructor) {
|
||||
return statement->parentScope.lock();
|
||||
} else if (statement->kind == StatementKind::Typedef) {
|
||||
if (statement->type == aType) // prevent infinite loop
|
||||
return statement;
|
||||
|
|
Loading…
Reference in New Issue