Aladdin - Scala Bugtracking
[#935] project: compiler priority: low category: feature
submitter assigned to status date submitted
Stephane Martin won't fix 2007-02-05 13:47:34.0
subject missing deprecation warnings
code
object Main {
  [deprecated] def foo(x: int) = x
  [deprecated] def bar(x: int) = foo(x)
  def main(args: Array[String]) {
    Console.println(bar(2))
  }
}
what happened
test.scala:5: warning: method bar in object Main is deprecated
    Console.println(bar(2))
                    ^
one warning found
what expected
test.scala:3: warning: method foo in object Main is deprecated
  [deprecated] def bar(x: int) = foo(x)
                                 ^
test.scala:5: warning: method bar in object Main is deprecated
    Console.println(bar(2))
                    ^
two warnings found
[back to overview]
Changes of this bug report
Stephane  edited on  2007-02-05 13:47:48.0
Stephane  edited on  2007-02-05 13:50:45.0
Martin  edited on  2007-02-05 14:10:19.0
That's actually a feature, not a bug. If your method is deprecated, it's not useful to have deprecation warnings for its code. So the compiler gies to great lengths to suppress those.