title: Swift Framework returns 'ambiguous use of' method extension in lldb
body: <p>I've upgraded to Xcode 11 &amp; swift 5, and hit an an issue with method extensions when they are made available through a framework. More specifically, in a project structured like this:</p>
  
  <pre><code>-&gt; Main Project
  -&gt; Framework created from sources in 'Main Project'
  -&gt; Subproject using the above Framework (Sources packaged in the framework are not visible to the sub-project)
  </code></pre>
  
  <p>Everything compiles and runs fine, but when running debug sessions on the subproject, all extensions in 'Framework' return <code>error: ambiguous use of</code> when invoked from the lldb command line. Here is a code sample to give an idea:</p>
  
  <p>Create a macOs command line project, and add a new target, 'MagicFramework', and in a file Spells.swift (make sure the file is visible to Main &amp; MagicFramework)</p>
  
  <pre><code>import Foundation
  
  extension String {
      public func castSpell() -&gt; String {
          return "✨ " + self
      }
  }
  </code></pre>
  
  <p>Then create a subproject 'Wizard', and in a file wizard.swift (visible to Wizard only):</p>
  
  <pre><code>import Foundation
  import MagicFramework
  
  
  public class Tadaa {
  
      public func magic(spell:String) -&gt; String {
          return spell.castSpell()
      }
  }
  </code></pre>
  
  <p>in Wizard's main.swift file, add:</p>
  
  <pre><code>import Foundation
  
  let aa = Tadaa().magic(spell: "this is magic")
  
  print(aa)
  </code></pre>
  
  <p>You should have the following structure:</p>
  
  <pre><code>-&gt; Main project
  ----&gt; MagicFramework
  ----&gt; Wizard subproject
  </code></pre>
  
  <p>then build&amp;run 'Wizard' sub, with a break point on <code>spell.castSpell()</code> in <code>Tadaa</code>. At the lldb prompt, type:</p>
  
  <pre><code>(lldb)po spell.castSpell()
  error: &lt;EXPR&gt;:3:1: error: ambiguous use of 'castSpell()'
  spell.castSpell()
  </code></pre>
  
  <p>why?? This problem didn't occur with Xcode 10.</p>