Skip to content

Commit e360c2a

Browse files
authored
Merge pull request #1967 from ennru/ennru_AwsomeErrorMessages
Support expecting compiler errors from all phases
2 parents b5a9c8c + daf21a7 commit e360c2a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/test/dotty/tools/dotc/reporting/ErrorMessagesTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ trait ErrorMessagesTest extends DottyTest {
5757
}
5858
}
5959

60-
def checkMessages(source: String): Report = {
61-
checkCompile("frontend", source) { (_,ictx) => () }
60+
def checkMessagesAfter(checkAfterPhase: String)(source: String): Report = {
61+
checkCompile(checkAfterPhase, source) { (_,ictx) => () }
6262
val rep = ctx.reporter.asInstanceOf[CapturingReporter].toReport
6363
ctx = freshReporter(ctx)
6464
rep

compiler/test/dotty/tools/dotc/reporting/ErrorMessagesTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ class ErrorMessagesTests extends ErrorMessagesTest {
1212
// In the case where there are no errors, we can do "expectNoErrors" in the
1313
// `Report`
1414
@Test def noErrors =
15-
checkMessages("""class Foo""")
15+
checkMessagesAfter("frontend")("""class Foo""")
1616
.expectNoErrors
1717

1818
@Test def typeMismatch =
19-
checkMessages {
19+
checkMessagesAfter("frontend") {
2020
"""
2121
|object Foo {
2222
| def bar: String = 1

0 commit comments

Comments
 (0)