Skip to content

Commit e2c81df

Browse files
committed
Fix a regression when printing C++ methods
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent 0ff9e14 commit e2c81df

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Generator/Generators/C/CppTypePrinter.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,11 +590,12 @@ public override TypePrinterResult VisitMethodDecl(Method method)
590590
@class = $"::{method.Namespace.Visit(this)}::";
591591
break;
592592
default:
593-
return string.Empty;
593+
@class = string.Empty;
594+
break;
594595
}
595596

596597
var @params = string.Join(", ", method.Parameters.Select(p => p.Visit(this)));
597-
var @const = (method.IsConst ? " const" : string.Empty);
598+
var @const = method.IsConst ? " const" : string.Empty;
598599
var name = method.OperatorKind == CXXOperatorKind.Conversion ||
599600
method.OperatorKind == CXXOperatorKind.ExplicitConversion ?
600601
$"operator {method.OriginalReturnType.Visit(this)}" :

0 commit comments

Comments
 (0)