summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-07-17 12:57:30 -0700
committerPaul Phillips <paulp@improving.org>2013-07-17 13:12:42 -0700
commit750892d4d3e155f1f14a9694151e9ac33f6dc3ff (patch)
treedf9a458d75170d40d7440b1fc6c0b666bed96e54 /src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
parent9761d2286848173b4cc90a0f28d9e6ea0f3248cf (diff)
downloadscala-750892d4d3e155f1f14a9694151e9ac33f6dc3ff.tar.gz
scala-750892d4d3e155f1f14a9694151e9ac33f6dc3ff.tar.bz2
scala-750892d4d3e155f1f14a9694151e9ac33f6dc3ff.zip
Fixing exhaustiveness warnings.
ClassfileAnnotArg becoming sealed brought tidings of not being exhaustive.
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
index 3265af9f5b..9bad29097c 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
@@ -486,14 +486,10 @@ abstract class Pickler extends SubComponent {
}
}
def putClassfileAnnotArg(carg: ClassfileAnnotArg) {
- carg match {
- case LiteralAnnotArg(const) =>
- putConstant(const)
- case ArrayAnnotArg(args) =>
- if (putEntry(carg))
- args foreach putClassfileAnnotArg
- case NestedAnnotArg(annInfo) =>
- putAnnotation(annInfo)
+ (carg: @unchecked) match {
+ case LiteralAnnotArg(const) => putConstant(const)
+ case ArrayAnnotArg(args) => if (putEntry(carg)) args foreach putClassfileAnnotArg
+ case NestedAnnotArg(annInfo) => putAnnotation(annInfo)
}
}
val AnnotationInfo(tpe, args, assocs) = annot
@@ -559,13 +555,10 @@ abstract class Pickler extends SubComponent {
/** Write a ClassfileAnnotArg (argument to classfile annotation) */
def writeClassfileAnnotArg(carg: ClassfileAnnotArg) {
- carg match {
- case LiteralAnnotArg(const) =>
- writeRef(const)
- case ArrayAnnotArg(args) =>
- writeRef(carg)
- case NestedAnnotArg(annInfo) =>
- writeRef(annInfo)
+ (carg: @unchecked) match {
+ case LiteralAnnotArg(const) => writeRef(const)
+ case ArrayAnnotArg(args) => writeRef(carg)
+ case NestedAnnotArg(annInfo) => writeRef(annInfo)
}
}