diff options
author | Paul Phillips <paulp@improving.org> | 2009-10-25 06:00:59 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-10-25 06:00:59 +0000 |
commit | 728775440ccd67928c25914a1e003ff9765ad80b (patch) | |
tree | bc0d55939eb9ed99cd869dc5a9dbbc1f7b4c4555 /src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala | |
parent | 2cef1c58a54c996243fb85630cce841073c18650 (diff) | |
download | scala-728775440ccd67928c25914a1e003ff9765ad80b.tar.gz scala-728775440ccd67928c25914a1e003ff9765ad80b.tar.bz2 scala-728775440ccd67928c25914a1e003ff9765ad80b.zip |
Deprecation patrol.
compile scalac with -deprecation and not cause any machines to catch
fire. Most of the remaining warnings are glancing furtively at Tuple2,
waiting for the moment to pounce.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala index 58b0dce333..e6a247483d 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala @@ -419,20 +419,14 @@ abstract class TreeBrowsers { case ValDef(mods, name, tpe, rhs) => mods.annotations ::: List(tpe, rhs) - case DefDef(mods, name, tparams, vparams, tpe, rhs) => { - var children: List[Tree] = List() - children = tparams ::: children - children = List.flatten(vparams) ::: children - mods.annotations ::: tpe :: rhs :: children - } + case DefDef(mods, name, tparams, vparams, tpe, rhs) => + mods.annotations ::: tpe :: rhs :: vparams.flatten ::: tparams case TypeDef(mods, name, tparams, rhs) => mods.annotations ::: rhs :: tparams // @M: was List(rhs, lobound) - case Import(expr, selectors) => { - var children: List[Tree] = List(expr) - children - } + case Import(expr, selectors) => + List(expr) case CaseDef(pat, guard, body) => List(pat, guard, body) @@ -542,12 +536,10 @@ abstract class TreeBrowsers { /** Return a textual representation of this t's symbol */ def symbolText(t: Tree): String = { - var prefix = "" - - if (t.hasSymbol) - prefix = "[has] " - if (t.isDef) - prefix = "[defines] " + val prefix = + if (t.hasSymbol) "[has] " + else if (t.isDef) "[defines] " + else "" prefix + t.symbol } |