diff options
author | Paul Phillips <paulp@improving.org> | 2013-09-18 08:02:32 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-09-18 08:02:36 -0700 |
commit | 2b03ac41c0f53d7a411e7f232d6814d7d51051a3 (patch) | |
tree | 3addaef5b4e39a4eab9c829421582f7109607e08 /src/reflect/scala/reflect/internal/util/package.scala | |
parent | a8543ef28f8fc0152208f4eef763344657bf9e5a (diff) | |
download | scala-2b03ac41c0f53d7a411e7f232d6814d7d51051a3.tar.gz scala-2b03ac41c0f53d7a411e7f232d6814d7d51051a3.tar.bz2 scala-2b03ac41c0f53d7a411e7f232d6814d7d51051a3.zip |
Type housekeeping.
Moved ListOfNil somewhere more generally accessible. No
reason the compiler should hoard it for itself. Flitted
to a few locations with constructs like ".head.head" and
".tail.head" looking for code which could be rewritten. Found
some, admittedly not always making use of ListOfNil.
Made overdue moves of ConstantType(Constant(true|false|null))
to vals in Definitions.
Diffstat (limited to 'src/reflect/scala/reflect/internal/util/package.scala')
-rw-r--r-- | src/reflect/scala/reflect/internal/util/package.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/util/package.scala b/src/reflect/scala/reflect/internal/util/package.scala index df63a55090..3618c150ca 100644 --- a/src/reflect/scala/reflect/internal/util/package.scala +++ b/src/reflect/scala/reflect/internal/util/package.scala @@ -7,6 +7,9 @@ import scala.language.existentials // SI-6541 package object util { import StringOps.longestCommonPrefix + // An allocation-avoiding reusable instance of the so-common List(Nil). + val ListOfNil: List[List[Nothing]] = Nil :: Nil + def andFalse(body: Unit): Boolean = false // Shorten a name like Symbols$FooSymbol to FooSymbol. |