title: Why won't my scalatest test compile? (scala.MatchError)
body: <p>There is all of the code in my project:</p>
  
  <pre><code>package fileSearcher
  
  import org.scalatest.FlatSpec
  
  class FilterCheckerTests extends org.scalatest.FlatSpec {
    "Foo" should
    "not do terrible things" in {
  
      assert(1 == 1)
    }  
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/VbsBQ.png" alt="Eclipse"></p>
  
  <p>sbt test crashes with scala.MatchError (full details below).</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>[info] Compiling 1 Scala source to C:\scala\course\FileSearcher\target\scala-2.1
  0\test-classes...
  [error]
  [error]      while compiling: C:\scala\course\FileSearcher\src\test\scala\fileSe
  archer\FilterCheckerTests.scala
  [error]         during phase: typer
  [error]      library version: version 2.10.4
  [error]     compiler version: version 2.10.4
  [error]   reconstructed args: -classpath C:\scala\course\FileSearcher\target\sca
  la-2.10\test-classes;C:\scala\course\FileSearcher\target\scala-2.10\classes;C:\U
  sers\Max\.ivy2\cache\org.scalatest\scalatest_2.11\bundles\scalatest_2.11-2.2.4.j
  ar;C:\Users\Max\.ivy2\cache\org.scala-lang\scala-reflect\jars\scala-reflect-2.11
  .2.jar;C:\Users\Max\.ivy2\cache\org.scala-lang.modules\scala-xml_2.11\bundles\sc
  ala-xml_2.11-1.0.2.jar;C:\Users\Max\.ivy2\cache\com.novocode\junit-interface\jar
  s\junit-interface-0.11.jar;C:\Users\Max\.ivy2\cache\junit\junit\jars\junit-4.11.
  jar;C:\Users\Max\.ivy2\cache\org.hamcrest\hamcrest-core\jars\hamcrest-core-1.3.j
  ar;C:\Users\Max\.ivy2\cache\org.scala-sbt\test-interface\jars\test-interface-1.0
  .jar -bootclasspath C:\Program Files\Java\jdk1.8.0_20\jre\lib\resources.jar;C:\P
  rogram Files\Java\jdk1.8.0_20\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_20\j
  re\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_20\jre\lib\jsse.jar;C:\Prog
  ram Files\Java\jdk1.8.0_20\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_20\jre
  \lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_20\jre\lib\jfr.jar;C:\Program F
  iles\Java\jdk1.8.0_20\jre\classes;C:\Users\Max\.ivy2\cache\org.scala-lang\scala-
  library\jars\scala-library-2.10.4.jar
  [error]
  [error]   last tree to typer: Literal(Constant(true))
  [error]               symbol: null
  [error]    symbol definition: null
  [error]                  tpe: Boolean(true)
  [error]        symbol owners:
  [error]       context owners: value &lt;local FilterCheckerTests&gt; -&gt; class FilterCh
  eckerTests -&gt; package fileSearcher
  [error]
  [error] == Enclosing template or block ==
  [error]
  [error] Template( // val &lt;local FilterCheckerTests&gt;: &lt;notype&gt; in class FilterChe
  ckerTests
  [error]   "org.scalatest.FlatSpec" // parents
  [error]   ValDef(
  [error]     private
  [error]     "_"
  [error]     &lt;tpt&gt;
  [error]     &lt;empty&gt;
  [error]   )
  [error]   // 2 statements
  [error]   DefDef( // def &lt;init&gt;(): fileSearcher.FilterCheckerTests in class Filt
  erCheckerTests
  [error]     &lt;method&gt;
  [error]     "&lt;init&gt;"
  [error]     []
  [error]     List(Nil)
  [error]     &lt;tpt&gt; // tree.tpe=fileSearcher.FilterCheckerTests
  [error]     Block( // tree.tpe=Unit
  [error]       Apply( // def &lt;init&gt;(): org.scalatest.FlatSpec in class FlatSpec,
  tree.tpe=org.scalatest.FlatSpec
  [error]         FilterCheckerTests.super."&lt;init&gt;" // def &lt;init&gt;(): org.scalatest
  .FlatSpec in class FlatSpec, tree.tpe=()org.scalatest.FlatSpec
  [error]         Nil
  [error]       )
  [error]       ()
  [error]     )
  [error]   )
  [error]   Apply(
  [error]     "Foo".should("not do terrible things")."in"
  [error]     Apply(
  [error]       "assert"
  [error]       Apply( // def ==(x: Int): Boolean in class Int, tree.tpe=Boolean(t
  rue)
  [error]         1."$eq$eq" // def ==(x: Int): Boolean in class Int, tree.tpe=(x:
   Int)Boolean
  [error]         1
  [error]       )
  [error]     )
  [error]   )
  [error] )
  [error]
  [error] == Expanded type of tree ==
  [error]
  [error] ConstantType(value = Constant(true))
  [error]
  [error] uncaught exception during compilation: scala.MatchError
  [trace] Stack trace suppressed: run last test:compile for the full output.
  [error] (test:compile) scala.MatchError: false (of class scala.reflect.internal.
  Trees$Literal)
  [error] Total time: 0 s, completed Jun 20, 2015 11:07:15 AM
  1. Waiting for source changes... (press enter to interrupt)
  </code></pre>