Scala Programming Language
  1. Scala Programming Language
  2. SI-5715

scalac warns about deprecated use of identifier "then" even if it is marked as deprecated

    Details

      Description

      In the following source code

          @deprecated("Use Then instead of then", "0.10.0-M2")
          def then[B : BaseTypeMapper](res: Column[B]) = Then(res)
      

      scalac complains that

      C:\Users\szeiger\code\scala-query\src\main\scala\scala\slick\ql\Case.scala:28: then is now a reserved word; usage as an identifier is deprecated
          def then[B : BaseTypeMapper](res: Column[B]) = Then(res)
              ^
      

      This is not usually the case when using deprecated API. If the caller is also deprecated, no warning should be emitted.

        Activity

        Hide
        Paul Phillips added a comment -

        This is actually tricky to deal with, because we need to warn on then but not `then` (I don't know if jira will savage my backticks) and that information is discarded before annotations are processed.

        Show
        Paul Phillips added a comment - This is actually tricky to deal with, because we need to warn on then but not `then` (I don't know if jira will savage my backticks) and that information is discarded before annotations are processed.

          People

          • Assignee:
            Unassigned
            Reporter:
            Stefan Zeiger
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development