<div dir="ltr"><div><div><div>b.sw:<br>func findIndex&lt;T: Equatable&gt;(array: [T], _ valueToFind: T) -&gt; Int? {<br>    for (index, value) in array.enumerated() {<br>        if value == valueToFind {<br>            return index<br>        }<br>    }<br>    return nil<br>}<br><br>let foundAtIndex = findIndex([1, 2, 3, 4], 3)<br>print(foundAtIndex == 2) // true<br><br>===================<br>~/git/swift-source$ build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/bin/swift b.sw<br>b.sw:10:44: error: unnamed argument #2 must precede unnamed argument #1<br>let foundAtIndex = findIndex([1, 2, 3, 4], 3)<br>                             ~~~~~~~~~~~~  ^<br>                             3             [1, 2, 3, 4]<br><br></div>The error seems to arise from the requirement:<br>&gt; If a parameter has an argument label, the argument <em>must</em> be labeled when you call the function.<br><br></div><div>Instead the shown error assumes the order is swapped because first argument was unnamed. Should the former (from requirement) be shown as the error here?<br></div><div><br></div><div>-Kevin<br></div></div></div>