Skip to content

Commit eb53ae7

Browse files
committed
Save existing parameter when doing C++ parameter type printing.
1 parent b632051 commit eb53ae7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Generator/Generators/C/CppTypePrinter.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,12 @@ public override TypePrinterResult VisitParameters(IEnumerable<Parameter> @params
413413
public override TypePrinterResult VisitParameter(Parameter param,
414414
bool hasName = true)
415415
{
416-
var result = param.Type.Visit(this, param.QualifiedType.Qualifiers);
416+
Parameter oldParam = Parameter;
417+
Parameter = param;
418+
419+
var result = param.QualifiedType.Visit(this);
420+
421+
Parameter = oldParam;
417422

418423
string name = param.Name;
419424
bool printName = hasName && !string.IsNullOrEmpty(name);

0 commit comments

Comments
 (0)