RESOLVED FIXED 214202
AX: Build failure for catalyst
https://bugs.webkit.org/show_bug.cgi?id=214202
Summary AX: Build failure for catalyst
chris fleizach
Reported 2020-07-10 14:57:37 PDT
./accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1512:12: error: cannot initialize return object of type 'BOOL' (aka 'signed char') with an rvalue of type 'WebCore::AXCoreObject *' return Accessibility::findAncestor<AXCoreObject>(*self.axBackingObject, false, [] (const AXCoreObject& object) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1522:12: error: cannot initialize return object of type 'BOOL' (aka 'signed char') with an rvalue of type 'WebCore::AXCoreObject *'
Attachments
patch (1.87 KB, patch)
2020-07-10 15:02 PDT, chris fleizach
no flags
Radar WebKit Bug Importer
Comment 1 2020-07-10 14:57:48 PDT
chris fleizach
Comment 2 2020-07-10 15:02:37 PDT
zalan
Comment 3 2020-07-10 15:11:32 PDT
wouldn't !(!) work here as well?
chris fleizach
Comment 4 2020-07-10 15:36:30 PDT
(In reply to zalan from comment #3) > wouldn't !(!) work here as well? I think so but isn't comparing against nullptr more clear?
EWS
Comment 5 2020-07-10 15:42:20 PDT
Committed r264243: <https://trac.webkit.org/changeset/264243> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404006 [details].
zalan
Comment 6 2020-07-10 15:45:35 PDT
(In reply to chris fleizach from comment #4) > (In reply to zalan from comment #3) > > wouldn't !(!) work here as well? > > I think so but isn't comparing against nullptr more clear? WebKit prefers it the other way around (instead of [if (foo != nullptr)] we usually go like [if (!foo)])
chris fleizach
Comment 7 2020-07-10 15:50:24 PDT
(In reply to zalan from comment #6) > (In reply to chris fleizach from comment #4) > > (In reply to zalan from comment #3) > > > wouldn't !(!) work here as well? > > > > I think so but isn't comparing against nullptr more clear? > WebKit prefers it the other way around (instead of [if (foo != nullptr)] we > usually go like [if (!foo)]) So in this case you think return !(!Accessibility::findAncestor<AXCoreObject>(*self.axBackingObject, false, [] (const AXCoreObject& object) { return object.roleValue() == AccessibilityRole::DescriptionListTerm; })); would be better suited?
zalan
Comment 8 2020-07-10 15:55:23 PDT
(In reply to chris fleizach from comment #7) > (In reply to zalan from comment #6) > > (In reply to chris fleizach from comment #4) > > > (In reply to zalan from comment #3) > > > > wouldn't !(!) work here as well? > > > > > > I think so but isn't comparing against nullptr more clear? > > WebKit prefers it the other way around (instead of [if (foo != nullptr)] we > > usually go like [if (!foo)]) > > So in this case you think > > return !(!Accessibility::findAncestor<AXCoreObject>(*self.axBackingObject, > false, [] (const AXCoreObject& object) { > return object.roleValue() == AccessibilityRole::DescriptionListTerm; > })); > > would be better suited? Yeah, I would change it to !!Accessibility::findAncestor as a drive-by fix whenever you make some changes in here.
chris fleizach
Comment 9 2020-07-10 16:16:16 PDT
(In reply to zalan from comment #8) > (In reply to chris fleizach from comment #7) > > (In reply to zalan from comment #6) > > > (In reply to chris fleizach from comment #4) > > > > (In reply to zalan from comment #3) > > > > > wouldn't !(!) work here as well? > > > > > > > > I think so but isn't comparing against nullptr more clear? > > > WebKit prefers it the other way around (instead of [if (foo != nullptr)] we > > > usually go like [if (!foo)]) > > > > So in this case you think > > > > return !(!Accessibility::findAncestor<AXCoreObject>(*self.axBackingObject, > > false, [] (const AXCoreObject& object) { > > return object.roleValue() == AccessibilityRole::DescriptionListTerm; > > })); > > > > would be better suited? > Yeah, I would change it to !!Accessibility::findAncestor as a drive-by fix > whenever you make some changes in here. Noted
Note You need to log in before you can comment on or make changes to this bug.