@@ -389,10 +389,12 @@ static void FixupField (FieldInfo? field, KotlinProperty metadata)
389389 return null ;
390390
391391 // Public/protected getters look like "getFoo"
392+ // Public/protected getters with unsigned types look like "getFoo-abcdefg"
392393 // Internal getters look like "getFoo$main"
394+ // Internal getters with unsigned types look like "getFoo-WZ4Q5Ns$main"
393395 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 ) ) ;
396398
397399 possible_methods = possible_methods . Where ( method =>
398400 method . GetParameters ( ) . Length == 0 &&
@@ -409,10 +411,12 @@ static void FixupField (FieldInfo? field, KotlinProperty metadata)
409411 return null ;
410412
411413 // Public/protected setters look like "setFoo"
414+ // Public/protected setters with unsigned types look like "setFoo-abcdefg"
412415 // Internal setters look like "setFoo$main"
416+ // Internal setters with unsigned types look like "setFoo-WZ4Q5Ns$main"
413417 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 ) ) ;
416420
417421 possible_methods = possible_methods . Where ( method =>
418422 property . ReturnType != null &&
0 commit comments