title: Cannot import compiler/typescript.ts
body: <p>The one line program helloworld </p>
  
  <pre><code>///&lt;reference path='/Users/tadams/git/typescript/src/compiler/typescript.ts'/&gt;
  </code></pre>
  
  <p>breaks typescript-0.9.0</p>
  
  <p>the error is 
  bash-3.2$ tsc helloworld.ts </p>
  
  <pre><code>/Users/tadams/git/typescript/bin/tsc.js:42270
                  comparisonInfo.flags |= 128 /* InconsistantPropertyAccesib
                                ^
  TypeError: Cannot read property 'flags' of undefined
  at PullTypeResolver.sourcePropertyIsRelatableToTargetProperty (/Users/tadams/git/typescript/bin/tsc.js:42270:35)
  at PullTypeResolver.sourceMembersAreRelatableToTargetMembers (/Users/tadams/git/typescript/bin/tsc.js:42243:27)
  at PullTypeResolver.sourceIsRelatableToTarget (/Users/tadams/git/typescript/bin/tsc.js:42183:46)
  at PullTypeResolver.sourceIsAssignableToTarget (/Users/tadams/git/typescript/bin/tsc.js:42003:25)
  at PullTypeResolver.computeCallExpressionSymbol (/Users/tadams/git/typescript/bin/tsc.js:41007:51)
  at PullTypeResolver.resolveCallExpression (/Users/tadams/git/typescript/bin/tsc.js:40891:29)
  at PullTypeChecker.typeCheckCallExpression (/Users/tadams/git/typescript/bin/tsc.js:44820:58)
  at PullTypeChecker.typeCheckAST (/Users/tadams/git/typescript/bin/tsc.js:43506:33)
  at PullTypeChecker.typeCheckReturnStatement (/Users/tadams/git/typescript/bin/tsc.js:45394:35)
  at PullTypeChecker.typeCheckAST (/Users/tadams/git/typescript/bin/tsc.js:43639:33)
  </code></pre>
  
  <p>Does anybody know what's going on or what this error message means?  Running typescript-0.9.0 on Mac OS X 10.8.  Thanks!</p>
  
  <p>UPDATE:
    There was a bug in typescript .9.  A method were not called with enough arguments which lead to this strange bug.  Here's the bug patch diff.</p>
  
  <pre><code>diff --git a/src/compiler/typecheck/pullTypeResolution.ts b/src/compiler/typecheck/pullTypeResolution.ts
  index ec3d236..801ed2f 100644
  --- a/src/compiler/typecheck/pullTypeResolution.ts
  +++ b/src/compiler/typecheck/pullTypeResolution.ts
  @@ -4001,7 +4001,7 @@ module TypeScript {
                       getTypeAtIndex: (index: number) =&gt; { return rightType; } // we only want the "second" type - the "first" is skipped
                   }
  
  -                var bestCommonType = this.findBestCommonType(leftType, null, collection, context);
  +                var bestCommonType = this.findBestCommonType(leftType, null, collection, context, new TypeComparisonInfo());
  
                   if (bestCommonType) {
                       symbol = bestCommonType;
  @@ -6442,7 +6442,7 @@ module TypeScript {
                           setTypeAtIndex: (index: number, type: PullTypeSymbol) =&gt; { } , // no contextual typing here, so no need to do anything
                            getTypeAtIndex: (index: number) =&gt; { return index ?     Q.signature.getReturnType() : best.signature.getReturnType(); } // we only want the "second" type  - the "first" is skippe
                       }
      -                    var bct = this.findBestCommonType(best.signature.getReturnType(), null, collection, context);
      +                    var bct = this.findBestCommonType(best.signature.getReturnType(), null,    collection, context, new TypeComparisonInfo());
                       ambiguous = !bct;
                   }
                   else {
      @@ -6844,4 +6844,4 @@ module TypeScript {
               return sig;
           }
       }
      -}
      \ No newline at end of file
      +}`
  </code></pre>