Skip to content

Commit 886a596

Browse files
committed
Fix last bit of log spam
1 parent 6793812 commit 886a596

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkgs/ffigen/lib/src/code_generator/objc_methods.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ mixin ObjCMethods {
5757
return oldMethod;
5858
}
5959

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+
6068
// Check the duplicate is the same method.
6169
if (!newMethod.sameAs(oldMethod)) {
6270
_logger.severe('Duplicate methods with different signatures: '

0 commit comments

Comments
 (0)