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

Stack Overflow | freedev | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Scala - Pattern Matching MatchError

    Stack Overflow | 8 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