File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
src/Generator/Generators/CSharp Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ public string VisitParameter(Parameter parameter)
2727 if ( desugared . IsPrimitiveType ( ) &&
2828 ( parameter . DefaultArgument . Declaration != null ||
2929 parameter . DefaultArgument . Class == StatementClass . BinaryOperator ) )
30- return $ "({ desugared . Visit ( typePrinter ) } ) { expression } ";
30+ return $ "({ desugared . Visit ( typePrinter ) } ) ( { expression } ) ";
3131 var finalType = ( desugared . GetFinalPointee ( ) ?? desugared ) . Desugar ( ) ;
3232 if ( finalType . TryGetClass ( out var @class ) && @class . IsInterface )
3333 return $@ "({ @class . Visit ( typePrinter ) } ) ({
34- @class . OriginalClass . Visit ( typePrinter ) } ) { expression } " ;
34+ @class . OriginalClass . Visit ( typePrinter ) } ) ( { expression } ) " ;
3535 return expression ;
3636 }
3737
@@ -88,4 +88,4 @@ public string ToString(Type type)
8888
8989 private readonly TypePrinter typePrinter ;
9090 }
91- }
91+ }
Original file line number Diff line number Diff line change @@ -1273,4 +1273,8 @@ extern "C"
12731273 s.field2 = 10 ;
12741274 return s;
12751275 }
1276- } // extern "C"
1276+ } // extern "C"
1277+
1278+ void DLL_API FunctionWithFlagsAsDefaultParameter (int defaultParam)
1279+ {
1280+ }
Original file line number Diff line number Diff line change @@ -1567,3 +1567,5 @@ extern "C"
15671567 DLL_API void takeConflictName (struct system * self);
15681568 DLL_API struct system freeFunctionReturnByValue ();
15691569} // extern "C"
1570+
1571+ void DLL_API FunctionWithFlagsAsDefaultParameter (int defaultParam = A | B);
You can’t perform that action at this time.
0 commit comments