aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/reporting
diff options
context:
space:
mode:
authorEnno Runne <enno@runne.net>2017-02-23 13:51:42 +0100
committerEnno Runne <enno@runne.net>2017-02-23 13:51:42 +0100
commit9202810e80997105a598a3298f1ac199d5324a23 (patch)
tree72753eadf72abedaa71394c4c23cc8b22936dd5c /compiler/test/dotty/tools/dotc/reporting
parent2699715684e9ea474001e9fc85bb3c7d25ed1ca5 (diff)
downloaddotty-9202810e80997105a598a3298f1ac199d5324a23.tar.gz
dotty-9202810e80997105a598a3298f1ac199d5324a23.tar.bz2
dotty-9202810e80997105a598a3298f1ac199d5324a23.zip
Change 'private, protected, or this expected' to Message
Diffstat (limited to 'compiler/test/dotty/tools/dotc/reporting')
-rw-r--r--compiler/test/dotty/tools/dotc/reporting/ErrorMessagesTests.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/test/dotty/tools/dotc/reporting/ErrorMessagesTests.scala b/compiler/test/dotty/tools/dotc/reporting/ErrorMessagesTests.scala
index 971a40a1b..d6e687a1e 100644
--- a/compiler/test/dotty/tools/dotc/reporting/ErrorMessagesTests.scala
+++ b/compiler/test/dotty/tools/dotc/reporting/ErrorMessagesTests.scala
@@ -198,4 +198,18 @@ class ErrorMessagesTests extends ErrorMessagesTest {
assertTrue("expected trait", isTrait)
}
+ @Test def constructorModifier =
+ checkMessagesAfter("frontend") {
+ """
+ |class AnotherClass @deprecated ()
+ """.stripMargin
+ }
+ .expect { (ictx, messages) =>
+ implicit val ctx: Context = ictx
+ val defn = ictx.definitions
+
+ assertMessageCount(1, messages)
+ val AnnotatedPrimaryConstructorRequiresModifierOrThis(cls) :: Nil = messages
+ assertEquals("AnotherClass", cls.show)
+ }
}