Guest User

Untitled

a guest
Sep 15th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.34 KB | None | 0 0
  1. case class Align( s: String )
  2. case class Donkaments()
  3.  
  4. val incomingObj = new Align("lawl")
  5.  
  6. val align = incomingObj match {
  7.   case align: Align => println("going to align" + align.s )//callSomeFunction/insert anon function
  8.   case donks: Donkaments => println("relax")
  9.   case unspportedType => println("can only handle Align/Donkaments)
  10. }
Add Comment
Please, Sign In to add comment