<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">nightly (1.9.0-dev.20160307)</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// A self-contained demonstration of the problem follows...
export abstract class CaseClass {
  constructor(...args: any[]) {}
}

abstract class TestCaseClass extends CaseClass {
  static A = &lt;typeof CaseClass&gt; class extends TestCaseClass {
    v: number;
    constructor(v: number) {
      super();
      this.v = v;
    }
  };
  static B = &lt;typeof CaseClass&gt; class extends TestCaseClass {
    v: string;
    constructor(v: string) {
      super();
      this.v = v;
    }
  };
}

function test(v: TestCaseClass.A) {
  return v.v;
}"><pre class="notranslate"><span class="pl-c">// A self-contained demonstration of the problem follows...</span>
<span class="pl-k">export</span> <span class="pl-k">abstract</span> <span class="pl-k">class</span> <span class="pl-smi">CaseClass</span> <span class="pl-kos">{</span>
  <span class="pl-en">constructor</span><span class="pl-kos">(</span>...<span class="pl-s1">args</span>: <span class="pl-smi">any</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">abstract</span> <span class="pl-k">class</span> <span class="pl-smi">TestCaseClass</span> <span class="pl-k">extends</span> <span class="pl-smi">CaseClass</span> <span class="pl-kos">{</span>
  <span class="pl-k">static</span> <span class="pl-c1">A</span> <span class="pl-c1">=</span> <span class="pl-kos">&lt;</span><span class="pl-k">typeof</span> <span class="pl-smi">CaseClass</span><span class="pl-kos">&gt;</span> <span class="pl-k">class</span> <span class="pl-k">extends</span> <span class="pl-smi">TestCaseClass</span> <span class="pl-kos">{</span>
    <span class="pl-c1">v</span>: <span class="pl-smi">number</span><span class="pl-kos">;</span>
    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">v</span>: <span class="pl-smi">number</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">v</span> <span class="pl-c1">=</span> <span class="pl-s1">v</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span><span class="pl-kos">;</span>
  <span class="pl-k">static</span> <span class="pl-c1">B</span> <span class="pl-c1">=</span> <span class="pl-kos">&lt;</span><span class="pl-k">typeof</span> <span class="pl-smi">CaseClass</span><span class="pl-kos">&gt;</span> <span class="pl-k">class</span> <span class="pl-k">extends</span> <span class="pl-smi">TestCaseClass</span> <span class="pl-kos">{</span>
    <span class="pl-c1">v</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span>
    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">v</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">v</span> <span class="pl-c1">=</span> <span class="pl-s1">v</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">function</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">v</span>: <span class="pl-smi">TestCaseClass</span><span class="pl-kos">.</span><span class="pl-smi">A</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">return</span> <span class="pl-s1">v</span><span class="pl-kos">.</span><span class="pl-c1">v</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
I would expect this to compile.</p>
<p dir="auto"><strong>Actual behavior:</strong><br>
A failure in the compilation of <code class="notranslate">test</code>:</p>
<p dir="auto"><code class="notranslate">error TS2503: Cannot find namespace \'TestCaseClass\'.</code></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/970430/5548641/780c2af6-8bb1-11e4-9bc2-b7ab25c90797.png"><img src="https://cloud.githubusercontent.com/assets/970430/5548641/780c2af6-8bb1-11e4-9bc2-b7ab25c90797.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Is this by design or a bug?</p>