fork(1) download
  1. object Main extends App {
  2. implicit class RichRegex(sc: StringContext) {
  3. def r = new util.matching.Regex(sc.parts.mkString, sc.parts.tail.map(_ => "x"): _*)
  4. }
  5. val string = "279"
  6. string match {
  7. case r"279" =>
  8. }
  9. string match {
  10. case r"\\d+" =>
  11. }
  12. }
Runtime error #stdin #stdout #stderr 0.37s 322496KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "main" scala.MatchError: 279 (of class java.lang.String)
	at Main$.delayedEndpoint$Main$1(Main.scala:9)
	at Main$delayedInit$body.apply(Main.scala:1)
	at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
	at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
	at scala.App$$anonfun$main$1.apply(App.scala:76)
	at scala.App$$anonfun$main$1.apply(App.scala:76)
	at scala.collection.immutable.List.foreach(List.scala:381)
	at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
	at scala.App$class.main(App.scala:76)
	at Main$.main(Main.scala:1)
	at Main.main(Main.scala)