Skip to content

Commit

Permalink
Fix last bit of log spam
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Nov 13, 2024
1 parent 6793812 commit 886a596
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/ffigen/lib/src/code_generator/objc_methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ mixin ObjCMethods {
return oldMethod;
}

// If one of the methods is optional, and the other is required, keep the
// required one.
if (newMethod.isOptional && !oldMethod.isOptional) {
return oldMethod;
} else if (!newMethod.isOptional && oldMethod.isOptional) {
return newMethod;
}

// Check the duplicate is the same method.
if (!newMethod.sameAs(oldMethod)) {
_logger.severe('Duplicate methods with different signatures: '
Expand Down

0 comments on commit 886a596

Please sign in to comment.