title: Function overloading ambiguous use - Xcode 12.5
body: <p>When I am defining enum:</p>
  <pre><code>enum Test: CGFloat {
      case zero
  }
  </code></pre>
  <p>and two functions that are similar to the following:</p>
  <pre><code>func test(_ param: CGFloat) { 
      print(&quot;param - \(param)&quot;) 
  }
  
  func test(_ param: Test) { 
      print(&quot;param - \(param.rawValue)&quot;) 
  }
  </code></pre>
  <p>Issue when I'm trying to use them:</p>
  <pre><code>test(Test.zero) &lt;- prints &quot;param - 0&quot;
  test(.zero) &lt;- error: ambiguous use of .zero
  </code></pre>
  <p>While I understand that compiler is clashing with two definitions of <code>.zero</code>, I'm trying to pinpoint where it was changed in release notes of Xcode 12.5. Maybe someone can point me in the right direction? As it seems it's working in 12.4.</p>
  <p>Note:</p>
  <p>It can be fixed by:</p>
  <ul>
  <li>Better design of the API;</li>
  <li>Using <code>@_disfavoredOverload</code> as per following <a href="https://forums.swift.org/t/compiler-choosing-between-functions-with-no-parameters-vs-functions-with-default-parameters/23501/2" rel="nofollow noreferrer">conversation</a>.</li>
  </ul>