Cannot override open method declared in class extension in another module swift
<p>I have a class extension declared in another module (using pods) like this.</p>

<pre><code>public extension UIView {
  open func doStuff() {...}
}
</code></pre>

<p>And when I try to override this method in subclass inside my current project module </p>

<pre><code>class ConcreteView : UIView {
  override open func doStuff() {...}
}
</code></pre>

<p>I get an error:</p>

<blockquote>
  <p>Overriding non-open instance method outside of its defining module</p>
</blockquote>

<p>despite the method is actually marked as <strong>open</strong></p>

<p>As a workaround I declared another class inside same module where extension is declared and overrided desired method there</p>

<pre><code>public class CustomView: UIView {
  override open func doStuff() {...}
}
</code></pre>

<p>and set this class as super class for my class in main module</p>

<pre><code>class ConcreteView : CustomView
</code></pre>

<p>so only after this I was able to override the method.</p>

<p>It really looks like a bug in swift3 but maybe I've omitted some understanding of why it works in that way?</p>