Skip to content

Commit

Permalink
Fix last bit of log spam (#1719)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe authored Nov 13, 2024
1 parent 8211198 commit d65584a
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 d65584a

Please sign in to comment.