File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
src/Generator/Generators/C Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -226,10 +226,10 @@ public override bool VisitProperty(Property property)
226
226
if ( property . HasGetter )
227
227
GeneratePropertyGetter ( property . GetMethod ) ;
228
228
229
- if ( property . HasSetter )
229
+ if ( property . HasSetter && property . SetMethod != null )
230
230
GeneratePropertySetter ( property . SetMethod ) ;
231
231
232
- PopBlock ( ) ;
232
+ PopBlock ( NewLineKind . Never ) ;
233
233
234
234
return true ;
235
235
}
@@ -447,11 +447,18 @@ public void GenerateFunctionCall(Function function)
447
447
var method = function as Method ;
448
448
var @class = function . Namespace as Class ;
449
449
450
- var field = ( method ? . AssociatedDeclaration as Property ) ? . Field ;
450
+ var property = method ? . AssociatedDeclaration as Property ;
451
+ var field = property ? . Field ;
451
452
if ( field != null )
452
453
{
453
454
Write ( $ "((::{ @class . QualifiedOriginalName } *){ Helpers . InstanceIdentifier } )->") ;
454
- WriteLine ( $ "{ field . OriginalName } ;") ;
455
+ Write ( $ "{ field . OriginalName } ") ;
456
+
457
+ var isGetter = property . GetMethod == method ;
458
+ if ( isGetter )
459
+ WriteLine ( ";" ) ;
460
+ else
461
+ WriteLine ( $ " = { @params [ 0 ] . Name } ;") ;
455
462
}
456
463
else
457
464
{
You can’t perform that action at this time.
0 commit comments