@@ -389,10 +389,12 @@ static void FixupField (FieldInfo? field, KotlinProperty metadata)
389
389
return null ;
390
390
391
391
// Public/protected getters look like "getFoo"
392
+ // Public/protected getters with unsigned types look like "getFoo-abcdefg"
392
393
// Internal getters look like "getFoo$main"
394
+ // Internal getters with unsigned types look like "getFoo-WZ4Q5Ns$main"
393
395
var possible_methods = property . IsInternalVisibility ?
394
- klass . Methods . Where ( method => method . Name . StartsWith ( $ "get{ property . Name . Capitalize ( ) } $", StringComparison . Ordinal ) ) :
395
- klass . Methods . Where ( method => method . Name . Equals ( $ "get{ property . Name . Capitalize ( ) } ", StringComparison . Ordinal ) ) ;
396
+ klass . Methods . Where ( method => method . GetMethodNameWithoutSuffix ( ) . StartsWith ( $ "get{ property . Name . Capitalize ( ) } $", StringComparison . Ordinal ) ) :
397
+ klass . Methods . Where ( method => method . GetMethodNameWithoutSuffix ( ) . Equals ( $ "get{ property . Name . Capitalize ( ) } ", StringComparison . Ordinal ) ) ;
396
398
397
399
possible_methods = possible_methods . Where ( method =>
398
400
method . GetParameters ( ) . Length == 0 &&
@@ -409,10 +411,12 @@ static void FixupField (FieldInfo? field, KotlinProperty metadata)
409
411
return null ;
410
412
411
413
// Public/protected setters look like "setFoo"
414
+ // Public/protected setters with unsigned types look like "setFoo-abcdefg"
412
415
// Internal setters look like "setFoo$main"
416
+ // Internal setters with unsigned types look like "setFoo-WZ4Q5Ns$main"
413
417
var possible_methods = property . IsInternalVisibility ?
414
- klass . Methods . Where ( method => method . Name . StartsWith ( $ "set{ property . Name . Capitalize ( ) } $", StringComparison . Ordinal ) ) :
415
- klass . Methods . Where ( method => method . Name . Equals ( $ "set{ property . Name . Capitalize ( ) } ", StringComparison . Ordinal ) ) ;
418
+ klass . Methods . Where ( method => method . GetMethodNameWithoutSuffix ( ) . StartsWith ( $ "set{ property . Name . Capitalize ( ) } $", StringComparison . Ordinal ) ) :
419
+ klass . Methods . Where ( method => method . GetMethodNameWithoutSuffix ( ) . Equals ( $ "set{ property . Name . Capitalize ( ) } ", StringComparison . Ordinal ) ) ;
416
420
417
421
possible_methods = possible_methods . Where ( method =>
418
422
property . ReturnType != null &&
0 commit comments