title: scalac compiler error from IntelliJ (Play Framework) Assertion failed
body: <p>I'm using IntelliJ IDEA 13.1.6 CE</p>
  
  <p>I'm used to compiling my app from sbt in the terminate (which works).  I'd like to use the debugging features of IDEA and not have to overlook false-negative errors.</p>
  
  <p>The Project is set to compile scala 2.10.4 with JDK 1.8.0_25 ant project language level 8.0 (this also happens with language level 7.0).</p>
  
  <p>Here is the stacktrace when I "Make Module" in IDEA. It's failing on a particular Twirl *.template.scala file, but it fails on other files as well, such as the generated <code>target/scala-2.10/src_managed/main/controllers/routes.java</code> file</p>
  
  <pre><code>== Expanded type of tree ==
  ConstantType(value = Constant(play.twirl.api.Html))
  uncaught exception during compilation: java.lang.AssertionError
  Error:scalac: Error: assertion failed: List(object package$Stopwatch, object package$Stopwatch)
  java.lang.AssertionError: assertion failed: List(object package$Stopwatch, object package$Stopwatch)
    at scala.reflect.internal.Symbols$Symbol.suchThat(Symbols.scala:1678)
    at scala.reflect.internal.Symbols$ClassSymbol.companionModule0(Symbols.scala:2988)
    at scala.reflect.internal.Symbols$ClassSymbol.companionModule(Symbols.scala:2991)
    at scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1371)
    at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:120)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1583)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1557)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1553)
    at scala.tools.nsc.Global$Run.compile(Global.scala:1662)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)
    at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
    at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
    at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
    at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:28)
    at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
    at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:64)
    at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:22)
    at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
  </code></pre>
  
  <p>This gist has the full AST for the Template: <a href="https://gist.github.com/joshm1/1615d75925dcdb3bc23e" rel="nofollow">https://gist.github.com/joshm1/1615d75925dcdb3bc23e</a></p>