Skip to content

Commit 34b0ba7

Browse files
committed
Change test of error message for 2.13.2
1 parent 8bf5f52 commit 34b0ba7

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala

+18-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,30 @@ import org.junit.Test
44

55
class CompilerErrors extends CompilerTesting {
66
@Test
7-
def t7185() =
8-
expectXmlError("""|overloaded method value apply with alternatives:
7+
def t7185() = {
8+
// Error message 2.13.1 and earlier:
9+
// expectXmlError("""|overloaded method value apply with alternatives:
10+
// | (f: scala.xml.Node => Boolean)scala.xml.NodeSeq <and>
11+
// | (i: Int)scala.xml.Node
12+
// | cannot be applied to ()""".stripMargin,
13+
// """|object Test {
14+
// | <e></e>()
15+
// |}""")
16+
17+
// Error message changed in Scala 2.13.2
18+
// https://github.com/scala/scala/pull/8592
19+
expectXmlError("overloaded method", // " apply "
20+
"""|object Test {
21+
| <e></e>()
22+
|}""")
23+
expectXmlError("""|with alternatives:
924
| (f: scala.xml.Node => Boolean)scala.xml.NodeSeq <and>
1025
| (i: Int)scala.xml.Node
1126
| cannot be applied to ()""".stripMargin,
1227
"""|object Test {
1328
| <e></e>()
1429
|}""")
30+
}
1531

1632
@Test
1733
def t1878_typer() =

0 commit comments

Comments
 (0)