We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41a47bb commit dc1c089Copy full SHA for dc1c089
compiler/test/dotty/tools/dotc/reporting/ErrorMessagesTests.scala
@@ -1010,4 +1010,21 @@ class ErrorMessagesTests extends ErrorMessagesTest {
1010
assertEquals(extender.show, "class B")
1011
assertEquals(parent.show, "class A")
1012
}
1013
+
1014
+ @Test def tailrecNotApplicableNeitherPrivateNorFinal =
1015
+ checkMessagesAfter("tailrec") {
1016
+ """
1017
+ |class Foo {
1018
+ |
1019
+ | @scala.annotation.tailrec
1020
+ | def foo: Unit = foo
1021
1022
+ |}
1023
+ """.stripMargin
1024
+ }.expect { (ictx, messages) =>
1025
+ implicit val ctx: Context = ictx
1026
+ assertMessageCount(1, messages)
1027
+ val TailrecNotApplicableNeitherPrivateNorFinal(symbol) :: Nil = messages
1028
+ assertEquals(symbol.show, "method foo")
1029
+ }
1030
0 commit comments