Skip to content
This repository was archived by the owner on Feb 23, 2018. It is now read-only.

Commit 984d294

Browse files
author
extempore
committed
Deprecation patrol. There was a bug among the deprecation
warnings due to my changing a map from mutable to immutable (which ought to be the good direction) because "def update" still lingers on immutable maps. I counted the days elapsed since it was marked for death (before 2.8.0) and added in the bugliness of what I was looking at and bid it farewell. Now removed: def update on immutable maps. No review. git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@24469 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
1 parent f23af51 commit 984d294

File tree

13 files changed

+25
-32
lines changed

13 files changed

+25
-32
lines changed

src/compiler/scala/tools/nsc/CompileServer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,6 @@ object CompileServer extends StandardCompileServer {
180180
run()
181181

182182
compileSocket.deletePort(port)
183-
exit(0)
183+
sys.exit(0)
184184
}
185185
}

src/compiler/scala/tools/nsc/MainGenericRunner.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ object MainGenericRunner {
7373
else command.thingToRun match {
7474
case None =>
7575
// We start the repl when no arguments are given.
76-
new ILoop main settings
77-
true // not actually reached in general
76+
new ILoop process settings
7877

7978
case Some(thingToRun) =>
8079
val isObjectName =

src/compiler/scala/tools/nsc/doc/html/page/Template.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage {
6363

6464
<div id="mbrsel">
6565
<div id='textfilter'><span class='pre'/><span class='input'><input type='text' accesskey='/'/></span><span class='post'/></div>
66-
{ if (tpl.linearization.isEmpty) NodeSeq.Empty else
66+
{ if (tpl.linearizationTemplates.isEmpty) NodeSeq.Empty else
6767
<div id="order">
6868
<span class="filtertype">Ordering</span>
6969
<ol><li class="alpha in">Alphabetic</li><li class="inherit out">By inheritance</li></ol>
7070
</div>
7171
}
72-
{ if (tpl.linearization.isEmpty) NodeSeq.Empty else
72+
{ if (tpl.linearizationTemplates.isEmpty) NodeSeq.Empty else
7373
<div id="ancestors">
7474
<span class="filtertype">Inherited</span>
7575
<ol><li class="hideall">Hide All</li><li class="showall">Show all</li></ol>
@@ -112,7 +112,7 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage {
112112
}
113113

114114
{
115-
NodeSeq fromSeq (for ((superTpl, superType) <- tpl.linearization) yield
115+
NodeSeq fromSeq (for ((superTpl, superType) <- (tpl.linearizationTemplates zip tpl.linearizationTypes)) yield
116116
<div class="parent" name={ superTpl.qualifiedName }>
117117
<h3>Inherited from {
118118
if (tpl.universe.settings.useStupidTypes.value)
@@ -292,7 +292,7 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage {
292292
}
293293
} ++
294294
{ mbr match {
295-
case dtpl: DocTemplateEntity if (isSelf && !dtpl.linearization.isEmpty && !isReduced) =>
295+
case dtpl: DocTemplateEntity if (isSelf && !dtpl.linearizationTemplates.isEmpty && !isReduced) =>
296296
<div class="block">
297297
linear super types: { typesToHtml(dtpl.linearizationTypes, hasLinks = true, sep = xml.Text(", ")) }
298298
</div>

src/compiler/scala/tools/nsc/interpreter/ILoop.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -734,10 +734,9 @@ class ILoop(in0: Option[BufferedReader], protected val out: PrintWriter)
734734

735735
// if they asked for no help and command is valid, we call the real main
736736
neededHelp() match {
737-
case "" => if (command.ok) main(command.settings) // else nothing
738-
case help => plush(help)
737+
case "" => command.ok && process(command.settings)
738+
case help => plush(help) ; true
739739
}
740-
true
741740
}
742741

743742
@deprecated("Use `process` instead")
@@ -763,7 +762,7 @@ object ILoop {
763762
val settings = new Settings
764763
settings.classpath.value = sys.props("java.class.path")
765764

766-
repl main settings
765+
repl process settings
767766
}
768767
}
769768
}

src/compiler/scala/tools/nsc/symtab/clr/TypeParser.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ abstract class TypeParser {
9292
val flags = Flags.JAVA | Flags.STATIC | Flags.IMPLICIT; // todo: static? shouldn't be final instead?
9393
val viewMethodType = (msym: Symbol) => JavaMethodType(msym.newSyntheticValueParams(List(fromTpe)), toTpe)
9494
val vmsym = createMethod(nme.view_ + viewSuffix, flags, viewMethodType, null, true);
95-
if (addToboxMethodMap) definitions.boxMethod(clazz) = vmsym
95+
// !!! this used to mutate a mutable map in definitions, but that map became
96+
// immutable and this kept "working" with a no-op. So now it's commented out
97+
// since I retired the deprecated code which allowed for that bug.
98+
//
99+
// if (addToboxMethodMap) definitions.boxMethod(clazz) = vmsym
100+
96101
if (isAddressOf) clrTypes.addressOfViews += vmsym
97102
vmsym
98103
}

src/library/scala/collection/immutable/IntMap.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,6 @@ sealed abstract class IntMap[+T] extends Map[Int, T] with MapLike[Int, T, IntMap
269269
case IntMap.Nil => IntMap.Tip(key, value);
270270
}
271271

272-
@deprecated("use `updated' instead")
273-
override def update[S >: T](key: Int, value: S): IntMap[S] = updated(key, value)
274-
275272
/**
276273
* Updates the map, using the provided function to resolve conflicts if the key is already present.
277274
*

src/library/scala/collection/immutable/LongMap.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,6 @@ sealed abstract class LongMap[+T] extends Map[Long, T] with MapLike[Long, T, Lon
267267
case LongMap.Nil => LongMap.Tip(key, value);
268268
}
269269

270-
@deprecated("use `updated' instead")
271-
override def update[S >: T](key: Long, value: S): LongMap[S] = updated(key, value)
272-
273270
/**
274271
* Updates the map, using the provided function to resolve conflicts if the key is already present.
275272
*

src/library/scala/collection/immutable/MapLike.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
** |/ **
77
\* */
88

9-
10-
119
package scala.collection
1210
package immutable
1311

@@ -124,7 +122,5 @@ trait MapLike[A, +B, +This <: MapLike[A, B, This] with Map[A, B]]
124122
for ((key, value) <- this) b += ((key, f(key, value)))
125123
b.result
126124
}
127-
128-
@deprecated("use `updated' instead")
129-
def update[B1 >: B](key: A, value: B1): immutable.Map[A, B1] = updated(key, value).asInstanceOf[immutable.Map[A, B1]]
130125
}
126+

src/library/scala/collection/immutable/TrieIteratorBase.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private[immutable] abstract class TrieIteratorBase[+T, CC >: Null <: Iterable[T]
168168
val arr: Array[CC] = determineType(m) match {
169169
case COLLISION_TYPE => collisionToArray(m)
170170
case TRIE_TYPE => getElems(m)
171-
case _ => error("cannot divide single element")
171+
case _ => sys.error("cannot divide single element")
172172
}
173173
arrayToIterators(arr)
174174
}

src/partest/scala/tools/partest/utils/Properties.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ package utils
1313
/** Loads partest.properties from the jar. */
1414
object Properties extends scala.util.PropertiesTrait {
1515
protected def propCategory = "partest"
16-
protected def pickJarBasedOn = classOf[Application]
16+
protected def pickJarBasedOn = classOf[nest.Worker]
1717
}

0 commit comments

Comments
 (0)