From fec54d6bb437280e74e4ec0286e42ae757b9b691 Mon Sep 17 00:00:00 2001 From: som-snytt Date: Wed, 11 May 2016 04:58:27 -0700 Subject: SI-9666: Use inline group names in Regex (#4990) Delegate `Match group name` to the underlying `matcher`. If that fails, try explicit group names as a fall back. No attempt is made to correlate inline and explicit names. In the following case, either name is accepted: ``` new Regex("a(?b*)c", "Bee") ``` But if names are reversed, the error is undetected: ``` new Regex("a(?b*)(?c)", "Bar", "Bee") ``` Throw IllegalArg on bad group name to be consistent with Java. --- test/files/run/reify_printf.scala | 1 - 1 file changed, 1 deletion(-) (limited to 'test/files') diff --git a/test/files/run/reify_printf.scala b/test/files/run/reify_printf.scala index c4ade79837..099a353e89 100644 --- a/test/files/run/reify_printf.scala +++ b/test/files/run/reify_printf.scala @@ -6,7 +6,6 @@ import scala.tools.reflect.ToolBox import scala.reflect.api._ import scala.reflect.api.Trees import scala.reflect.internal.Types -import scala.util.matching.Regex object Test extends App { //val output = new ByteArrayOutputStream() -- cgit v1.2.3