object Example1 {
// @deprecated def bigMistake = {
// println("Mistake.")
// }
// warning: match may not be exhaustive.
// true match {
// case true => true
// }
// no warning now
(true: @unchecked) match {
case true => true
}
// custom annotations
import annotation._
class strategy(arg: Annotation) extends Annotation
class delayed extends Annotation
@strategy(new delayed) def f() {}
}
Tuesday, October 20, 2015
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment