Skip to content

Instantly share code, notes, and snippets.

@akiradeveloper
Created May 16, 2015 03:28
Show Gist options
  • Save akiradeveloper/d0e2ff8348d8f06f9b28 to your computer and use it in GitHub Desktop.
Save akiradeveloper/d0e2ff8348d8f06f9b28 to your computer and use it in GitHub Desktop.
これがちゃんとコンパイル出来ないのだけどなぜ
import org.scalatest._
class Sample extends FunSuite {
test ("sample") {
assert(1 === 1)
}
}
// error message
[error] last tree to typer: ApplyToImplicitArgs(method ===)
[error] symbol: method === in class Equalizer (flags: <method>)
[error] symbol definition: def ===(rightSide: Any)(implicit equality: org.scalactic.Equality[L]): Boolean
[error] tpe: Boolean
[error] symbol owners: method === -> class Equalizer -> trait TripleEqualsSupport -> package scalactic
[error] context owners: value <local Sample> -> class Sample -> package <empty>
[error]
[error] == Enclosing template or block ==
[error]
[error] Template( // val <local Sample>: <notype> in class Sample
[error] "FunSuite" // parents
[error] ValDef(
[error] private
[error] "_"
[error] <tpt>
[error] <empty>
[error] )
[error] // 2 statements
[error] DefDef( // def <init>(): Sample in class Sample
[error] <method>
[error] "<init>"
[error] []
[error] List(Nil)
[error] <tpt> // tree.tpe=Sample
[error] Block( // tree.tpe=Unit
[error] Apply( // def <init>(): org.scalatest.FunSuite in class FunSuite, tree.tpe=org.scalatest.FunSuite
[error] Sample.super."<init>" // def <init>(): org.scalatest.FunSuite in class FunSuite, tree.tpe=()org.scalatest.FunSuite
[error] Nil
[error] )
[error] ()
[error] )
[error] )
[error] Apply(
[error] Apply(
[error] "test"
[error] "sample"
[error] )
[error] Apply(
[error] "assert"
[error] Apply(
[error] 1."$eq$eq$eq"
[error] 1
[error] )
[error] )
[error] )
[error] )
[error]
[error] == Expanded type of tree ==
[error]
[error] TypeRef(TypeSymbol(final abstract class Boolean extends AnyVal))
[error]
[error] uncaught exception during compilation: scala.MatchError
[trace] Stack trace suppressed: run last test:compileIncremental for the full output.
[error] (test:compileIncremental) scala.MatchError: false (of class scala.reflect.internal.Trees$Literal)
[error] Total time: 1 s, completed May 16, 2015 12:27:40 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment