You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like it only crashes in the repl for some reason. There has to be a superclass with a val.
scala>classColor(valred:Int)
defined classColor
scala>caseclassRed(r:Int) extendsColor(r)
defined classRed
scala>deff(c: Any) = c match { caseRed(_) => () }
Exception in thread "main" java.lang.IndexOutOfBoundsException
at scala.collection.LinearSeqOptimized$$class.apply(LinearSeqOptimized.scala:53)
at scala.collection.immutable.List.apply(List.scala:45)
at scala.tools.nsc.matching.Matrix$$MatrixContext$$PatternVarGroup.apply(Matrix.scala:184)
at scala.tools.nsc.matching.ParallelMatching$$MatchMatrix.classifyPat$$1(ParallelMatching.scala:74)
at scala.tools.nsc.matching.ParallelMatching$$MatchMatrix$$$$anonfun$$1$$$$anonfun$$apply$$1.apply(ParallelMatching.scala:76)
at scala.tools.nsc.matching.ParallelMatching$$MatchMatrix$$$$anonfun$$1$$$$anonfun$$apply$$1.apply(ParallelMatching.scala:76)
at scala.Function2$$$$anonfun$$tupled$$1.apply(Function2.scala:50)
...
The text was updated successfully, but these errors were encountered:
Looks like it only crashes in the repl for some reason. There has to be a superclass with a val.
The text was updated successfully, but these errors were encountered: