Draft! This page is a draft - a work in progress!

Scala cheatsheet Subscribe Pub Share

Sealed/final

sealed trait Color // exhaustiveness checking from compiler on case/match
final case object Red extends Color
final case object Green extends Color


Was this useful?    

By: Razie | 2017-06-02 | Tags: post


See more in: Cool Scala Subscribe

Viewed 715 times ( | History | Print ) this page.

You need to log in to post a comment!