title: Angular 2 RC6: cli-compiler says "function calls are not supported"
body: <p>When trying to compile my RC6 app using the following command:</p>
  
  <pre><code>ngc -p C:\Path\To\Project
  </code></pre>
  
  <p>(I am placed inside <code>C:\Path\To\Project\node_modules\.bin</code> when I'm running the command)</p>
  
  <p>I get the following error:</p>
  
  <pre><code>Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 20:25 in the original .ts file), resolving symbol CoreModule in C:/Path/To/Project/app/modules/core/core.module.ts
  </code></pre>
  
  <p>This is what it complains about:</p>
  
  <pre><code>@NgModule({
  imports: [
      CommonModule,
      TranslateModule.forRoot({ 
          provide: TranslateLoader,
          useFactory: (http: Http) =&gt; new TranslateStaticLoader(http, 'app/languages', '.json'),
          deps: [Http]
      })
  ],
  </code></pre>
  
  <p>If I remove <code>TranslateModule.forRoot...</code> the error disappears. </p>
  
  <p>How do I replace this with an exported function as the error implies?</p>