Skip to content

Change test of error message for 2.13.2 #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions jvm/src/test/scala-2.x/scala/xml/CompilerErrors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 <and>
// | (i: Int)scala.xml.Node
// | cannot be applied to ()""".stripMargin,
// """|object Test {
// | <e></e>()
// |}""")

// Error message changed in Scala 2.13.2
// https://github.com/scala/scala/pull/8592
expectXmlError("overloaded method", // " apply "
"""|object Test {
| <e></e>()
|}""")
expectXmlError("""|with alternatives:
| (f: scala.xml.Node => Boolean)scala.xml.NodeSeq <and>
| (i: Int)scala.xml.Node
| cannot be applied to ()""".stripMargin,
"""|object Test {
| <e></e>()
|}""")
}

@Test
def t1878_typer() =
Expand Down