From 34b0ba73299e2311ae9d64be021f510f87669372 Mon Sep 17 00:00:00 2001 From: "Aaron S. Hawley" Date: Sun, 22 Dec 2019 16:37:14 -0500 Subject: [PATCH] Change test of error message for 2.13.2 --- .../scala-2.x/scala/xml/CompilerErrors.scala | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala b/jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala index 6096e5a60..577d28ae5 100644 --- a/jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala +++ b/jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala @@ -4,14 +4,30 @@ import org.junit.Test class CompilerErrors extends CompilerTesting { @Test - def t7185() = - expectXmlError("""|overloaded method value apply with alternatives: + def t7185() = { + // Error message 2.13.1 and earlier: + // expectXmlError("""|overloaded method value apply with alternatives: + // | (f: scala.xml.Node => Boolean)scala.xml.NodeSeq + // | (i: Int)scala.xml.Node + // | cannot be applied to ()""".stripMargin, + // """|object Test { + // | () + // |}""") + + // Error message changed in Scala 2.13.2 + // https://github.com/scala/scala/pull/8592 + expectXmlError("overloaded method", // " apply " + """|object Test { + | () + |}""") + expectXmlError("""|with alternatives: | (f: scala.xml.Node => Boolean)scala.xml.NodeSeq | (i: Int)scala.xml.Node | cannot be applied to ()""".stripMargin, """|object Test { | () |}""") + } @Test def t1878_typer() =