New issue
Advanced search Search tips

Issue 732323 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

multiple methods named 'setLoadingProgress:' found ...

Project Member Reported by sdefresne@chromium.org, Jun 12 2017

Issue description

Compilation with Xcode 9 & use_xcode_clang fails with the following error:

../../ios/clean/chrome/browser/ui/toolbar/toolbar_mediator_unittest.mm:190:3: error: multiple methods named 'setLoadingProgress:' found with mismatched result, parameter type or attributes
  [[consumer_ verify] setLoadingProgress:0.42];
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../ios/clean/chrome/browser/ui/toolbar/toolbar_consumer.h:19:1: note: one possibility
- (void)setLoadingProgress:(double)progress;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/UIKit.framework/Frameworks/DocumentManager.framework/Headers/UIDocumentBrowserViewController.h:162:53: note: also found
@property (strong, nonatomic, nullable) NSProgress *loadingProgress;
                                                    ^~~~~~~~~~~~~~~
1 error generated.


 
Cc: marq@chromium.org
Components: Internals
This is due to the use of a mock. As the setLoadingProgress: method is only used twice, I will rename it to setLoadingProgressFraction: (as recommended by marq) to avoid having multiple selector with the same name but different types.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/76b8d1611c7b321ef24d8f63a6e58229f8db3de4

commit 76b8d1611c7b321ef24d8f63a6e58229f8db3de4
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Tue Jun 13 08:38:02 2017

[ios] Fix ambiguous selector name.

Rename ToolbarConsumer -setLoadingProgress: selector to avoid ambiguity
with property loadingProgress of UIDocumentBrowserTransitionController
added to iOS 11 SDK.

BUG= 732323 

Change-Id: I1feb46a2490ce309566cbc49aa4b3c8f76961581
Reviewed-on: https://chromium-review.googlesource.com/530946
Reviewed-by: Mark Cogan <marq@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478935}
[modify] https://crrev.com/76b8d1611c7b321ef24d8f63a6e58229f8db3de4/ios/clean/chrome/browser/ui/toolbar/toolbar_consumer.h
[modify] https://crrev.com/76b8d1611c7b321ef24d8f63a6e58229f8db3de4/ios/clean/chrome/browser/ui/toolbar/toolbar_mediator.mm
[modify] https://crrev.com/76b8d1611c7b321ef24d8f63a6e58229f8db3de4/ios/clean/chrome/browser/ui/toolbar/toolbar_mediator_unittest.mm
[modify] https://crrev.com/76b8d1611c7b321ef24d8f63a6e58229f8db3de4/ios/clean/chrome/browser/ui/toolbar/toolbar_view_controller.mm

Status: Fixed (was: Started)

Sign in to add a comment