<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The right first step is to raise a bug on JIRA <a href="https://bugs.swift.org" class="">https://bugs.swift.org</a> with the example test case in the mail. It will then be assigned to the appropriate individuals and prioritised/fixed accordingly.<div class=""><br class=""></div><div class="">Alex<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 23 Jan 2017, at 10:04, Wagner Truppel via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Right, so several people have agreed with me that a compiler warning is in order. My question now is: what’s the best way to get this request to the people who can make it happen? swift-dev list? swift-evolution list? Apple radar? Suggestions are welcome.<br class=""><br class="">Thanks.<br class="">Wagner<br class=""><br class=""><br class=""><blockquote type="cite" class="">On 9 Jan 2017, at 09:49, David Hart <<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>> wrote:<br class=""><br class="">I think we need a warning because it is definitely ambiguous and a common pitfall for users of an API. The only solution would be for the APIs be written so to avoid those ambiguities I think.<br class=""><br class=""><blockquote type="cite" class="">On 5 Jan 2017, at 08:58, Rien via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:<br class=""><br class="">As you know. there is no ambiguity, no warnings needed.<br class="">(The parameter is part of the identifier of the function)<br class=""><br class="">Imo, this request falls into the category “do as I think, not as I say”.<br class=""><br class="">That is a discussion without end. Personally I am against ANY warnings of this kind. The reason is that I want my code to compile warnings free (default compiler behaviour) and I do not want an extra pragma in the code to instruct the compiler that when I am calling “foo()” I do indeed want to call “foo()”.<br class=""><br class="">Regards,<br class="">Rien<br class=""><br class="">Site: <a href="http://balancingrock.nl" class="">http://balancingrock.nl</a><br class="">Blog: <a href="http://swiftrien.blogspot.com" class="">http://swiftrien.blogspot.com</a><br class="">Github: <a href="http://github.com/Swiftrien" class="">http://github.com/Swiftrien</a><br class="">Project: <a href="http://swiftfire.nl" class="">http://swiftfire.nl</a><br class=""><br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">On 05 Jan 2017, at 03:29, Wagner Truppel via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:<br class=""><br class="">Hello,<br class=""><br class="">I wasn’t sure whether to post this message here, at swift-dev, or at swift-evolution. so I’ll try here first. Hopefully it will get to the right group of people or, if not, someone will point me to the right mailing list.<br class=""><br class="">I came across a situation that boils down to this example:<br class=""><br class="">class Parent {<br class=""> func foo() {<br class=""> print("Parent foo() called")<br class=""> }<br class="">}<br class=""><br class="">class Child: Parent {<br class=""> func foo(x: Int = 0) {<br class=""> print("Child foo() called")<br class=""> }<br class="">}<br class=""><br class="">let c = Child()<br class="">c.foo() // prints "Parent foo() called"<br class=""><br class="">I understand why this behaves like so, namely, the subclass has a method foo(x:) but no direct implementation of foo() so the parent’s implementation is invoked rather than the child's. That’s all fine except that it is not very intuitive.<br class=""><br class="">I would argue that the expectation is that the search for an implementation should start with the subclass (which is does) but should look at all possible restrictions of parent implementations, including the restriction due to default values.<br class=""><br class="">At the very least, I think the compiler should emit a warning or possibly even an error.<br class=""><br class="">Thanks for reading.<br class="">Cheers,<br class=""><br class="">Wagner<br class="">_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></blockquote><br class="">_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></blockquote><br class=""></blockquote><br class="">_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>