Describe the bug
When renaming an (auto generated) type of a parameter, the decompiler of Ghidra seems not to be aware of the refactoring that took place. Instead, it produces a low level error stating it cannot resolve the type with the original name anymore.
To Reproduce
Expected behavior
Expected behaviour is that Ghidra refactors the code properly and uses the new name in the decompiled source code.
Screenshots
Step 3:

Step 4:

Step 5:

GIFv of the entire process:
https://i.imgur.com/s8h6ZWC.gifv
Environment (please complete the following information):
EDIT:
* Additional information *
It seems this does not always happen, but it fails usually on the "this" parameter of a __thiscall subroutine.
You should to change class name (Symbol Tree → Classes) also or to edit prototype of function (should check Use Custom Storage for changing datatype of this parameter).
Most helpful comment
You should to change class name (
Symbol Tree→Classes) also or to edit prototype of function (should checkUse Custom Storagefor changing datatype ofthisparameter).