scala.MatchError: an instance of class week4.Expr$Sum

Stack Overflow | freedev | 10 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Scala - Pattern Matching MatchError

    Stack Overflow | 10 months ago | freedev
    scala.MatchError: an instance of class week4.Expr$Sum

    Root Cause Analysis

    1. scala.MatchError

      an instance of class week4.Expr$Sum

      at week4.Expr.show()
    2. week4
      Expr.toString
      1. week4.Expr.show(ExpressionProblem.scala:8)
      2. week4.Expr.toString(ExpressionProblem.scala:14)
      2 frames
    3. Java RT
      PrintStream.println
      1. java.lang.String.valueOf(String.java:2994)
      2. java.io.PrintStream.println(PrintStream.java:821)
      2 frames
    4. Scala
      Predef$.println
      1. scala.Console$.println(Console.scala:148)
      2. scala.Predef$.println(Predef.scala:315)
      2 frames
    5. week4
      ExpressionProblem.main
      1. week4.ExpressionProblem$.main(ExpressionProblem.scala:31)
      2. week4.ExpressionProblem.main(ExpressionProblem.scala)
      2 frames