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

don't issue deprecation warnings for synthetic TypeTrees

    Details

      Description

      scala> object O { class C; @deprecated("", "") type D = C; def foo: Seq[D] = Nil }
      <console>:33: warning: type D in object O is deprecated:
             object O { class C; @deprecated("", "") type D = C; def foo: Seq[D] = Nil }
                                                                          ^
      defined object O
      
      scala> O.foo ++: Nil
      <console>:34: warning: type D in object O is deprecated:
             val res2 =
                 ^
      <console>:35: warning: type D in object O is deprecated:
                    O.foo ++: Nil
                          ^
      res2: List[O.D] = List()
      

      In Scala 2.9:

      scala> O.foo ++: Nil
      <console>:29: warning: type D in object O is deprecated: scala.this.deprecated.init$default$1
             val res1 =
                 ^
      <console>:30: warning: type D in object O is deprecated: scala.this.deprecated.init$default$1
                    O.foo ++: Nil
                          ^
      

        Activity

        Show
        Jason Zaugg added a comment - WIP: https://github.com/retronym/scala/compare/scala:2.10.x...ticket;7783
        Hide
        Jason Zaugg added a comment -

        I guess this change is debatable. I encountered it when using SBT 0.13; some plugins used a deprecated type alias and I incurred the wrath of the deprecation patrol.

        Show
        Jason Zaugg added a comment - I guess this change is debatable. I encountered it when using SBT 0.13; some plugins used a deprecated type alias and I incurred the wrath of the deprecation patrol.
        Show
        Jason Zaugg added a comment - Discussion: https://groups.google.com/d/msg/scala-internals/3nf9-X6Yfe4/kR3X2_i1KvcJ
        Show
        Jason Zaugg added a comment - https://github.com/scala/scala/pull/2986
        Show
        Jason Zaugg added a comment - https://github.com/scala/scala/pull/2986

          People

          • Assignee:
            Jason Zaugg
            Reporter:
            Jason Zaugg
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development