We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6793812 commit 886a596Copy full SHA for 886a596
pkgs/ffigen/lib/src/code_generator/objc_methods.dart
@@ -57,6 +57,14 @@ mixin ObjCMethods {
57
return oldMethod;
58
}
59
60
+ // If one of the methods is optional, and the other is required, keep the
61
+ // required one.
62
+ if (newMethod.isOptional && !oldMethod.isOptional) {
63
+ return oldMethod;
64
+ } else if (!newMethod.isOptional && oldMethod.isOptional) {
65
+ return newMethod;
66
+ }
67
+
68
// Check the duplicate is the same method.
69
if (!newMethod.sameAs(oldMethod)) {
70
_logger.severe('Duplicate methods with different signatures: '
0 commit comments