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)
27
27
if ( desugared . IsPrimitiveType ( ) &&
28
28
( parameter . DefaultArgument . Declaration != null ||
29
29
parameter . DefaultArgument . Class == StatementClass . BinaryOperator ) )
30
- return $ "({ desugared . Visit ( typePrinter ) } ) { expression } ";
30
+ return $ "({ desugared . Visit ( typePrinter ) } ) ( { expression } ) ";
31
31
var finalType = ( desugared . GetFinalPointee ( ) ?? desugared ) . Desugar ( ) ;
32
32
if ( finalType . TryGetClass ( out var @class ) && @class . IsInterface )
33
33
return $@ "({ @class . Visit ( typePrinter ) } ) ({
34
- @class . OriginalClass . Visit ( typePrinter ) } ) { expression } " ;
34
+ @class . OriginalClass . Visit ( typePrinter ) } ) ( { expression } ) " ;
35
35
return expression ;
36
36
}
37
37
@@ -88,4 +88,4 @@ public string ToString(Type type)
88
88
89
89
private readonly TypePrinter typePrinter ;
90
90
}
91
- }
91
+ }
Original file line number Diff line number Diff line change @@ -1273,4 +1273,8 @@ extern "C"
1273
1273
s.field2 = 10 ;
1274
1274
return s;
1275
1275
}
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"
1567
1567
DLL_API void takeConflictName (struct system * self);
1568
1568
DLL_API struct system freeFunctionReturnByValue ();
1569
1569
} // extern "C"
1570
+
1571
+ void DLL_API FunctionWithFlagsAsDefaultParameter (int defaultParam = A | B);
You can’t perform that action at this time.
0 commit comments