Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case class Align( s: String )
- case class Donkaments()
- val incomingObj = new Align("lawl")
- val align = incomingObj match {
- case align: Align => println("going to align" + align.s )//callSomeFunction/insert anon function
- case donks: Donkaments => println("relax")
- case unspportedType => println("can only handle Align/Donkaments)
- }
Add Comment
Please, Sign In to add comment