File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,17 @@ export abstract class BaseTypeGenerator<Type extends RustType> {
127
127
accessorName = Generator . snakeCaseToCamelCase ( field . contextualName ) ;
128
128
}
129
129
130
+ const methodNames = [ ] ;
131
+ for ( const currentMethod of containerType . methods ) {
132
+ const swiftMethodName = this . swiftMethodName ( currentMethod , containerType ) ;
133
+ methodNames . push ( swiftMethodName ) ;
134
+ }
135
+
136
+ if ( methodNames . includes ( accessorName ) ) {
137
+ console . log ( 'Presumptive redundant accessor:' , accessorName ) ;
138
+ return '' ;
139
+ }
140
+
130
141
const swiftReturnType = this . getPublicTypeSignature ( field . type , containerType ) ;
131
142
const fieldAccessor = `self.cType!.${ field . contextualName } ` ;
132
143
const preparedReturnValue = this . prepareRustReturnValueForSwift ( field , containerType ) ;
You can’t perform that action at this time.
0 commit comments