Skip to content

Instantly share code, notes, and snippets.

@pedrofurla
Last active September 29, 2017 02:11
Show Gist options
  • Save pedrofurla/761cf0c83d081776cf944c2bd0befc3d to your computer and use it in GitHub Desktop.
Save pedrofurla/761cf0c83d081776cf944c2bd0befc3d to your computer and use it in GitHub Desktop.
object IsItTrue {
val maybe = false
object bs {
val hhh = 10
def inc(x:Int) = x + 1
def sum(x:Int)(y:Int) = x + y
}
}
def f = false
def t = true
package sourcesource
object Main{
def main(args: Array[String]): Unit = {
import Source._
object IsItTrue {
val maybe = false
object bs {
val hhh = 10
def inc(x:Int) = x + 1
def sum(x:Int)(y:Int) = x + y
}
}
def f = false
def t = true
case class Complicated(a:Int, b:String)
val complicated = Complicated(10,"Bleh")
val complicated2 = Complicated(0,"Not")
println("\n===== FullInfo1 =======")
println(full( t && IsItTrue.maybe || t && !f && IsItTrue.bs.hhh == 10 && IsItTrue.bs.inc(6) == 7))
println("\n===== FullInfo2 =======")
println(full( IsItTrue.bs.inc(6) == 100 || IsItTrue.bs.sum(6)(7) == 50 || true == true ))
println("\n===== FullInfo3 =======")
println(full( IsItTrue.bs.inc(6) == 100 || IsItTrue.bs.sum(6)(7) == 50 || complicated == Complicated(10,"Bleh") ))
println("\n ======= Showraw ======== ")
println(full(complicated == Complicated(10,"Bleh")))
//println(raw(complicated == Complicated(10,"Bleh")))
}
}
@pedrofurla
Copy link
Author

outputs

[info] Running sourcesource.Main 

===== FullInfo1 =======
FullInfo(true,t && IsItTrue.maybe || t && !f && IsItTrue.bs.hhh == 10 && IsItTrue.bs.inc(6) == 7,Map(IsItTrue.bs.inc(6) -> 7, t -> true, f -> false, IsItTrue.maybe -> false, IsItTrue.bs.hhh -> 10))

===== FullInfo2 =======
FullInfo(true,IsItTrue.bs.inc(6) == 100 || IsItTrue.bs.sum(6)(7) == 50 || true == true,Map(IsItTrue.bs.inc(6) -> 7, IsItTrue.bs.sum(6)(7) -> 13))

===== FullInfo3 =======
FullInfo(true,IsItTrue.bs.inc(6) == 100 || IsItTrue.bs.sum(6)(7) == 50 || complicated == Complicated(10,"Bleh"),Map(IsItTrue.bs.inc(6) -> 7, IsItTrue.bs.sum(6)(7) -> 13, complicated -> Complicated(10,Bleh), Complicated.apply(10, "Bleh") -> Complicated(10,Bleh)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment