Swift 3 silently allows shadowing a parameter : <p>I'm switching to Swift, and I'm really not happy that the following code compiles without a warning:</p>

<pre><code>func f(_ x: inout Int?) {
    var x: Int? // &lt;-- this declaration should produce a warning
    x = 105
    if x! &lt; 1000 {}
}

var a: Int? = 3
f(&amp;a)
print("\(a)")
</code></pre>

<p>and, of course, outputs <code>Optional(3)</code> upon execution.</p>

<p>In this example, the <code>x</code> local variable shadows the <code>x</code> function parameter.</p>

<p>Turning on the <code>Hidden Local Variables</code> warning (<code>GCC_WARN_SHADOW</code>) in the project settings doesn't cause a warning to be produced either.</p>

<p><strong>Question:</strong> How should I proceed to make the Swift 3 compiler warn me about such shadowing?</p>
