The compiler is watching you

Report a typo

At the beginning of the app development, we had Statement:

sealed trait Statement:
  def text: String

object Statement:
  case class Positive(text: String) extends Statement
  case class Negative(text: String) extends Statement

There was also a conversion in another file that we needed to color the text:

val statementToColorId: Statement => String = {
  case Statement.Positive(_) => "green"
  case Statement.Negative(_) => "red"
}

Later we decided to add another Neutral type of expression, but forgot to fix the conversion to color.

object Statement:
  ...
  case class Neutral(text: String) extends Statement

The compiler wasn't additionally configured. What will the developer see when they tries to compile the project?

Select one option from the list
___

Create a free account to access the full topic