Skip to content
This repository
Browse code

Merged revisions 24803-24820 via svnmerge from

https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk

........
  r24803 | odersky | 2011-04-21 19:21:28 +0200 (Thu, 21 Apr 2011) | 1 line

  Added bridge method capability to compiler. Some tweaks to reflect
generic. No review (yet). ........ r24804 | odersky | 2011-04-22
00:41:20 +0200 (Fri, 22 Apr 2011) | 1 line

  Some more tweaks to the bridge scheme.
........
  r24805 | extempore | 2011-04-22 03:47:32 +0200 (Fri, 22 Apr 2011) | 1 line

  New starr based on r24804, no review.
........
  r24806 | odersky | 2011-04-22 11:21:28 +0200 (Fri, 22 Apr 2011) | 1 line

  Fixed spurious qualification of types that are locally quantified.
Review by extempore. ........ r24807 | extempore | 2011-04-23 00:01:22
+0200 (Sat, 23 Apr 2011) | 2 lines

  Fixing a BaseBerrySethi bug I introduced in r19842. Patch by buraq, no
review. ........ r24808 | eugenevigdorchik | 2011-04-23 14:18:53 +0200
(Sat, 23 Apr 2011) | 1 line

  Introduce new request for informing the presentation compiler of files
deletion. Review by odersky. ........ r24809 | extempore | 2011-04-23
17:14:59 +0200 (Sat, 23 Apr 2011) | 2 lines

  Strip unused pattern variable bindings out before performing match
translation. Closes #4269, no review. ........ r24810 | extempore |
2011-04-23 18:56:32 +0200 (Sat, 23 Apr 2011) | 1 line

  Reverted a jline commit which had broken history search, no review.
........ r24811 | pedrofurla | 2011-04-23 23:11:32 +0200 (Sat, 23 Apr
2011) | 1 line

  Shows migration and it's message. Contributed by Simon Ochsenreither
(soc). Review by malayeri. ........ r24812 | extempore | 2011-04-24
00:04:36 +0200 (Sun, 24 Apr 2011) | 5 lines

  Working my way through pattern matcher sequence issues mostly caused
  by the special handling of Lists. Also deleting all kinds of useless
  or almost useless code which is presently only clutter.

  Closes #2756, #2800, #3050, #3530, #3972, no review. ........ r24813 |
odersky | 2011-04-24 12:18:44 +0200 (Sun, 24 Apr 2011) | 1 line

  Refined handling fo @bridge methods. Review by extempore. ........
r24814 | extempore | 2011-04-24 18:19:21 +0200 (Sun, 24 Apr 2011) | 1
line

  Updated a bunch of @deprecated annotations to have a version, no
review. ........ r24815 | extempore | 2011-04-24 19:10:26 +0200 (Sun, 24
Apr 2011) | 1 line

  New starr based on r24814, no review.
........
  r24816 | extempore | 2011-04-24 21:15:19 +0200 (Sun, 24 Apr 2011) | 1 line

  Enclosed the out of bounds index with some IOOB exceptions, no review.
........ r24817 | extempore | 2011-04-24 21:15:46 +0200 (Sun, 24 Apr
2011) | 2 lines

  Removed restriction on case classes having only two parameter lists.
Closes #1333, no review. ........ r24818 | extempore | 2011-04-24
21:16:10 +0200 (Sun, 24 Apr 2011) | 2 lines

  Added warning when someone tries to return a non-Unit value from a
Unit method, no review. ........ r24819 | odersky | 2011-04-24 22:13:40
+0200 (Sun, 24 Apr 2011) | 1 line

  Added a bunch of bridges to make ameliorate binary compatibility of
new collections. Review by prokopec. Review by extempore. ........
r24820 | odersky | 2011-04-25 12:37:48 +0200 (Mon, 25 Apr 2011) | 1 line

  Temporarily moving interpreter.scala to pending. We need a more
robust solution wrt heap size before we can bring it back. (interpreter
scala randomly fails with OutOfMemoryError because it starts a new java
process with default heap size. Depending on the configuration, default
heap size is sometimes not enough.) ........
  • Loading branch information...
commit 15d477697395ff93c3065b7f2c7db06160662851 1 parent f5faa91
authored April 26, 2011

Showing 163 changed files with 1,163 additions and 784 deletions. Show diff stats Hide diff stats

  1. 2  lib/jline.jar.desired.sha1
  2. 2  lib/scala-compiler.jar.desired.sha1
  3. 2  lib/scala-library-src.jar.desired.sha1
  4. 2  lib/scala-library.jar.desired.sha1
  5. 2  src/actors/scala/actors/Scheduler.scala
  6. 4  src/compiler/scala/tools/nsc/GenericRunnerSettings.scala
  7. 2  src/compiler/scala/tools/nsc/Interpreter.scala
  8. 2  src/compiler/scala/tools/nsc/InterpreterCommand.scala
  9. 2  src/compiler/scala/tools/nsc/InterpreterLoop.scala
  10. 2  src/compiler/scala/tools/nsc/MainInterpreter.scala
  11. 2  src/compiler/scala/tools/nsc/ast/DocComments.scala
  12. 19  src/compiler/scala/tools/nsc/doc/html/page/Template.scala
  13. 4  src/compiler/scala/tools/nsc/doc/model/Entity.scala
  14. 20  src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
  15. 16  src/compiler/scala/tools/nsc/interactive/Global.scala
  16. 8  src/compiler/scala/tools/nsc/interpreter/ILoop.scala
  17. 2  src/compiler/scala/tools/nsc/interpreter/IMain.scala
  18. 2  src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala
  19. 1  src/compiler/scala/tools/nsc/matching/Matrix.scala
  20. 105  src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
  21. 10  src/compiler/scala/tools/nsc/matching/PatternBindings.scala
  22. 180  src/compiler/scala/tools/nsc/matching/Patterns.scala
  23. 4  src/compiler/scala/tools/nsc/package.scala
  24. 8  src/compiler/scala/tools/nsc/symtab/Definitions.scala
  25. 2  src/compiler/scala/tools/nsc/symtab/Names.scala
  26. 4  src/compiler/scala/tools/nsc/symtab/Symbols.scala
  27. 8  src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
  28. 24  src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
  29. 6  src/compiler/scala/tools/nsc/typechecker/Infer.scala
  30. 25  src/compiler/scala/tools/nsc/typechecker/Namers.scala
  31. 2  src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
  32. 16  src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
  33. 87  src/compiler/scala/tools/nsc/typechecker/Typers.scala
  34. 4  src/compiler/scala/tools/nsc/util/FreshNameCreator.scala
  35. 2  src/compiler/scala/tools/nsc/util/Position.scala
  36. 2  src/compiler/scala/tools/nsc/util/Set.scala
  37. 4  src/dbc/scala/dbc/DataType.scala
  38. 2  src/dbc/scala/dbc/Database.scala
  39. 2  src/dbc/scala/dbc/Syntax.scala
  40. 2  src/dbc/scala/dbc/Utilities.scala
  41. 2  src/dbc/scala/dbc/Value.scala
  42. 2  src/dbc/scala/dbc/Vendor.scala
  43. 2  src/dbc/scala/dbc/datatype/ApproximateNumeric.scala
  44. 2  src/dbc/scala/dbc/datatype/Boolean.scala
  45. 2  src/dbc/scala/dbc/datatype/Character.scala
  46. 2  src/dbc/scala/dbc/datatype/CharacterLargeObject.scala
  47. 2  src/dbc/scala/dbc/datatype/CharacterString.scala
  48. 2  src/dbc/scala/dbc/datatype/CharacterVarying.scala
  49. 2  src/dbc/scala/dbc/datatype/ExactNumeric.scala
  50. 2  src/dbc/scala/dbc/datatype/Factory.scala
  51. 2  src/dbc/scala/dbc/datatype/Numeric.scala
  52. 2  src/dbc/scala/dbc/datatype/String.scala
  53. 2  src/dbc/scala/dbc/datatype/Unknown.scala
  54. 2  src/dbc/scala/dbc/exception/IncompatibleSchema.scala
  55. 2  src/dbc/scala/dbc/exception/UnsupportedFeature.scala
  56. 4  src/dbc/scala/dbc/result/Field.scala
  57. 2  src/dbc/scala/dbc/result/FieldMetadata.scala
  58. 2  src/dbc/scala/dbc/result/Relation.scala
  59. 2  src/dbc/scala/dbc/result/Status.scala
  60. 2  src/dbc/scala/dbc/result/Tuple.scala
  61. 4  src/dbc/scala/dbc/statement/AccessMode.scala
  62. 2  src/dbc/scala/dbc/statement/DerivedColumn.scala
  63. 2  src/dbc/scala/dbc/statement/Expression.scala
  64. 2  src/dbc/scala/dbc/statement/Insert.scala
  65. 8  src/dbc/scala/dbc/statement/InsertionData.scala
  66. 4  src/dbc/scala/dbc/statement/IsolationLevel.scala
  67. 4  src/dbc/scala/dbc/statement/JoinType.scala
  68. 2  src/dbc/scala/dbc/statement/Jointure.scala
  69. 2  src/dbc/scala/dbc/statement/Relation.scala
  70. 2  src/dbc/scala/dbc/statement/Select.scala
  71. 2  src/dbc/scala/dbc/statement/SetClause.scala
  72. 4  src/dbc/scala/dbc/statement/SetQuantifier.scala
  73. 2  src/dbc/scala/dbc/statement/Statement.scala
  74. 2  src/dbc/scala/dbc/statement/Status.scala
  75. 2  src/dbc/scala/dbc/statement/Table.scala
  76. 2  src/dbc/scala/dbc/statement/Transaction.scala
  77. 2  src/dbc/scala/dbc/statement/Update.scala
  78. 2  src/dbc/scala/dbc/statement/expression/Aggregate.scala
  79. 2  src/dbc/scala/dbc/statement/expression/BinaryOperator.scala
  80. 2  src/dbc/scala/dbc/statement/expression/Constant.scala
  81. 2  src/dbc/scala/dbc/statement/expression/Field.scala
  82. 2  src/dbc/scala/dbc/statement/expression/FunctionCall.scala
  83. 2  src/dbc/scala/dbc/statement/expression/Select.scala
  84. 4  src/dbc/scala/dbc/statement/expression/SetFunction.scala
  85. 2  src/dbc/scala/dbc/statement/expression/TypeCast.scala
  86. 2  src/dbc/scala/dbc/statement/expression/UnaryOperator.scala
  87. 2  src/dbc/scala/dbc/syntax/DataTypeUtil.scala
  88. 2  src/dbc/scala/dbc/syntax/Database.scala
  89. 2  src/dbc/scala/dbc/syntax/Statement.scala
  90. 4  src/dbc/scala/dbc/syntax/StatementExpression.scala
  91. 4  src/dbc/scala/dbc/value/ApproximateNumeric.scala
  92. 4  src/dbc/scala/dbc/value/Boolean.scala
  93. 4  src/dbc/scala/dbc/value/Character.scala
  94. 4  src/dbc/scala/dbc/value/CharacterLargeObject.scala
  95. 4  src/dbc/scala/dbc/value/CharacterVarying.scala
  96. 2  src/dbc/scala/dbc/value/Conversion.scala
  97. 4  src/dbc/scala/dbc/value/ExactNumeric.scala
  98. 2  src/dbc/scala/dbc/value/Factory.scala
  99. 4  src/dbc/scala/dbc/value/Unknown.scala
  100. 2  src/dbc/scala/dbc/vendor/PostgreSQL.scala
  101. 2  src/jline/project/plugins/project/build.properties
  102. 10  src/jline/src/main/java/scala/tools/jline/TerminalSupport.java
  103. 2  src/jline/src/main/java/scala/tools/jline/console/ConsoleReader.java
  104. 62  src/jline/src/main/resources/scala/tools/jline/macbindings.properties
  105. 13  src/library/scala/annotation/bridge.scala
  106. 2  src/library/scala/collection/GenIterable.scala
  107. 2  src/library/scala/collection/GenMap.scala
  108. 2  src/library/scala/collection/GenSeq.scala
  109. 8  src/library/scala/collection/GenSeqLike.scala
  110. 2  src/library/scala/collection/GenSet.scala
  111. 17  src/library/scala/collection/GenSetLike.scala
  112. 2  src/library/scala/collection/GenTraversable.scala
  113. 13  src/library/scala/collection/IterableLike.scala
  114. 2  src/library/scala/collection/LinearSeqOptimized.scala
  115. 5  src/library/scala/collection/MapLike.scala
  116. 37  src/library/scala/collection/SeqLike.scala
  117. 13  src/library/scala/collection/SetLike.scala
  118. 7  src/library/scala/collection/Traversable.scala
  119. 7  src/library/scala/collection/TraversableLike.scala
  120. 5  src/library/scala/collection/generic/Addable.scala
  121. 62  src/library/scala/collection/generic/GenMapFactory.scala
  122. 26  src/library/scala/collection/generic/GenSeqFactory.scala
  123. 44  src/library/scala/collection/generic/GenSetFactory.scala
  124. 245  src/library/scala/collection/generic/GenTraversableFactory.scala
  125. 24  src/library/scala/collection/generic/GenericSeqCompanion.scala
  126. 30  src/library/scala/collection/generic/MapFactory.scala
  127. 2  src/library/scala/collection/generic/ParFactory.scala
  128. 2  src/library/scala/collection/generic/ParMapFactory.scala
  129. 2  src/library/scala/collection/generic/ParSetFactory.scala
  130. 12  src/library/scala/collection/generic/SeqFactory.scala
  131. 33  src/library/scala/collection/generic/SetFactory.scala
  132. 5  src/library/scala/collection/generic/Subtractable.scala
  133. 254  src/library/scala/collection/generic/TraversableFactory.scala
  134. 7  src/library/scala/collection/immutable/Range.scala
  135. 5  src/library/scala/collection/mutable/BufferLike.scala
  136. 7  src/library/scala/collection/mutable/PriorityQueue.scala
  137. 24  src/library/scala/collection/parallel/immutable/package.scala
  138. 2  src/library/scala/reflect/generic/Scopes.scala
  139. 2  src/library/scala/reflect/generic/Symbols.scala
  140. 7  src/library/scala/reflect/generic/Types.scala
  141. 7  src/library/scala/runtime/RichInt.scala
  142. 2  src/library/scala/util/automata/BaseBerrySethi.scala
  143. 2  src/swing/scala/swing/Component.scala
  144. 2  src/swing/scala/swing/GUIApplication.scala
  145. 10  src/swing/scala/swing/ListView.scala
  146. 2  src/swing/scala/swing/SimpleGUIApplication.scala
  147. 2  src/swing/scala/swing/UIElement.scala
  148. 8  src/swing/scala/swing/event/ComponentEvent.scala
  149. 4  test/files/neg/bug1333.check
  150. 1  test/files/neg/bug1333.scala
  151. 4  test/files/neg/unit-returns-value.check
  152. 1  test/files/neg/unit-returns-value.flags
  153. 11  test/files/neg/unit-returns-value.scala
  154. 11  test/files/pos/bug3972.scala
  155. 5  test/files/pos/bug4269.scala
  156. 3  test/files/run/bug1333.check
  157. 14  test/files/run/bug1333.scala
  158. 14  test/files/run/bug2800.check
  159. 36  test/files/run/bug2800.scala
  160. 2  test/{pending → files}/run/bug3050.scala
  161. 13  test/files/run/bug3530.check
  162. 36  test/files/run/bug3530.scala
  163. 0  test/{files → pending}/jvm/interpreter.scala
2  lib/jline.jar.desired.sha1
... ...
@@ -1 +1 @@
1  
-115e0f58e2ffa089c083c466b0161216dd4c916e ?jline.jar
  1
+5eade2bafa228aab1f5abc63e6062ce8052e4f6d ?jline.jar
2  lib/scala-compiler.jar.desired.sha1
... ...
@@ -1 +1 @@
1  
-e0382dfa2712e567b49f5826ac50eae59cf03cb3 ?scala-compiler.jar
  1
+5f31fab985a3efc21229297810c625b0a2593757 ?scala-compiler.jar
2  lib/scala-library-src.jar.desired.sha1
... ...
@@ -1 +1 @@
1  
-5ad90238f4fc57e8147fb69496c68d02ca073ca0 ?scala-library-src.jar
  1
+364c3b992bdebeac9fafb187e1acbece45644de7 ?scala-library-src.jar
2  lib/scala-library.jar.desired.sha1
... ...
@@ -1 +1 @@
1  
-678ada3690dd149c2bd302407e315a74de0bfd42 ?scala-library.jar
  1
+c52dbed261e4870a504cef24518484b335a38067 ?scala-library.jar
2  src/actors/scala/actors/Scheduler.scala
@@ -50,7 +50,7 @@ object Scheduler extends DelegatingScheduler {
50 50
 
51 51
   /* Only <code>ForkJoinScheduler</code> implements this method.
52 52
    */
53  
-  @deprecated("restart will be removed")
  53
+  @deprecated("restart will be removed", "2.8.0")
54 54
   def restart() {
55 55
     if (sched.isInstanceOf[ForkJoinScheduler]) {
56 56
       sched.asInstanceOf[ForkJoinScheduler].restart()
4  src/compiler/scala/tools/nsc/GenericRunnerSettings.scala
@@ -40,6 +40,6 @@ class GenericRunnerSettings(error: String => Unit) extends Settings(error) {
40 40
       "-nc",
41 41
       "do not use the fsc compilation daemon") withAbbreviation "-nocompdaemon"
42 42
 
43  
-  @deprecated("Use `nc` instead") def nocompdaemon = nc
44  
-  @deprecated("Use `save` instead") def savecompiled = save
  43
+  @deprecated("Use `nc` instead", "2.9.0") def nocompdaemon = nc
  44
+  @deprecated("Use `save` instead", "2.9.0") def savecompiled = save
45 45
 }
2  src/compiler/scala/tools/nsc/Interpreter.scala
@@ -5,7 +5,7 @@ import java.io._
5 5
 
6 6
 /** A compatibility stub.
7 7
  */
8  
-@deprecated("Use a class in the scala.tools.nsc.interpreter package.")
  8
+@deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0")
9 9
 class Interpreter(settings: Settings, out: PrintWriter) extends IMain(settings, out) {
10 10
   def this(settings: Settings) = this(settings, new NewLinePrintWriter(new ConsoleWriter, true))
11 11
   def this() = this(new Settings())
2  src/compiler/scala/tools/nsc/InterpreterCommand.scala
@@ -4,5 +4,5 @@ import interpreter._
4 4
 
5 5
 /** A compatibility stub.
6 6
  */
7  
-@deprecated("Use a class in the scala.tools.nsc.interpreter package.")
  7
+@deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0")
8 8
 class InterpreterCommand(arguments: List[String], error: String => Unit) extends CommandLine(arguments, error) { }
2  src/compiler/scala/tools/nsc/InterpreterLoop.scala
@@ -5,7 +5,7 @@ import java.io._
5 5
 
6 6
 /** A compatibility stub.
7 7
  */
8  
-@deprecated("Use a class in the scala.tools.nsc.interpreter package.")
  8
+@deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0")
9 9
 class InterpreterLoop(in0: Option[BufferedReader], out: PrintWriter) extends ILoop(in0, out) {
10 10
   def this(in0: BufferedReader, out: PrintWriter) = this(Some(in0), out)
11 11
   def this() = this(None, new PrintWriter(scala.Console.out))
2  src/compiler/scala/tools/nsc/MainInterpreter.scala
@@ -7,7 +7,7 @@ package scala.tools.nsc
7 7
 
8 8
 import interpreter._
9 9
 
10  
-@deprecated("Use a class in the scala.tools.nsc.interpreter package.")
  10
+@deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0")
11 11
 object MainInterpreter {
12 12
   def main(args: Array[String]): Unit = new ILoop main args
13 13
 }
2  src/compiler/scala/tools/nsc/ast/DocComments.scala
@@ -301,7 +301,7 @@ trait DocComments { self: SymbolTable =>
301 301
       val defines = sections filter { startsWithTag(raw, _, "@define") }
302 302
       val usecases = sections filter { startsWithTag(raw, _, "@usecase") }
303 303
 
304  
-      val end = startTag(raw, (defines ::: usecases).sort(_._1 < _._1))
  304
+      val end = startTag(raw, (defines ::: usecases).sortBy(_._1))
305 305
 
306 306
       (if (end == raw.length - 2) raw else raw.substring(0, end) + "*/",
307 307
        defines map { case (start, end) => raw.substring(start, end) },
19  src/compiler/scala/tools/nsc/doc/html/page/Template.scala
@@ -322,11 +322,10 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage {
322 322
 
323 323
     val annotations: Seq[scala.xml.Node] = {
324 324
       // A list of annotations which don't show their arguments, e. g. because they are shown separately.
325  
-      val annotationsWithHiddenArguments = List("deprecated", "Deprecated")
  325
+      val annotationsWithHiddenArguments = List("deprecated", "Deprecated", "migration")
326 326
 
327  
-      def showArguments(annotation: Annotation) = {
  327
+      def showArguments(annotation: Annotation) =
328 328
         if (annotationsWithHiddenArguments.contains(annotation.qualifiedName)) false else true
329  
-      }
330 329
 
331 330
       if (!mbr.annotations.isEmpty) {
332 331
         <dt>Annotations</dt>
@@ -358,11 +357,21 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage {
358 357
         <dd class="cmt">{ bodyToHtml(mbr.deprecation.get) }</dd>
359 358
       }
360 359
 
  360
+    val migration: Seq[scala.xml.Node] = {
  361
+      mbr.annotations.find(_.qualifiedName == "migration") match {
  362
+        case None => NodeSeq.Empty
  363
+        case Some(mig) => {
  364
+          <dt>Migration</dt>
  365
+          <dd class="cmt"><p>{mig.arguments.view.map(_.value).drop(2).mkString(" ")}</p></dd>
  366
+        }
  367
+      }
  368
+    }
  369
+
361 370
     val mainComment: Seq[scala.xml.Node] = mbr.comment match {
362 371
       case Some(comment) =>
363 372
         val example =
364 373
           if(!comment.example.isEmpty && !isReduced)
365  
-            <div class="block">Example{ if (comment.example.length > 1) "s" else ""} :
  374
+            <div class="block">Example{ if (comment.example.length > 1) "s" else ""}:
366 375
                 <ol>{
367 376
                 val exampleXml: List[scala.xml.NodeSeq] =
368 377
                   for(example <- comment.example ) yield
@@ -399,7 +408,7 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage {
399 408
     }
400 409
     // end attributes block vals ---
401 410
 
402  
-    val attributesInfo = attributes ++ definitionClasses ++ selfType ++ annotations ++ sourceLink ++ deprecation ++ mainComment
  411
+    val attributesInfo = attributes ++ definitionClasses ++ selfType ++ annotations ++ deprecation ++ migration ++ sourceLink ++ mainComment
403 412
     val attributesBlock =
404 413
       if (attributesInfo.isEmpty)
405 414
         NodeSeq.Empty
4  src/compiler/scala/tools/nsc/doc/model/Entity.scala
@@ -127,7 +127,7 @@ trait MemberEntity extends Entity {
127 127
   /** Some deprecation message if this member is deprecated, or none otherwise. */
128 128
   def deprecation: Option[Body]
129 129
 
130  
-  @deprecated("Use `inDefinitionTemplates` instead")
  130
+  @deprecated("Use `inDefinitionTemplates` instead", "2.9.0")
131 131
   def inheritedFrom: List[TemplateEntity]
132 132
 
133 133
   /** For members representing values: the type of the value returned by this member; for members
@@ -204,7 +204,7 @@ trait DocTemplateEntity extends TemplateEntity with MemberEntity {
204 204
   /** The direct super-type of this template. */
205 205
   def parentType: Option[TypeEntity]
206 206
 
207  
-  @deprecated("Use `linearizationTemplates` and `linearizationTypes` instead")
  207
+  @deprecated("Use `linearizationTemplates` and `linearizationTypes` instead", "2.9.0")
208 208
   def linearization: List[(TemplateEntity, TypeEntity)]
209 209
 
210 210
   /** All class, trait and object templates which are part of this template's linearization, in lineratization order.
20  src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
@@ -66,11 +66,11 @@ trait CompilerControl { self: Global =>
66 66
    *  if it does not yet exist create a new one atomically
67 67
    *  Note: We want to get roid of this operation as it messes compiler invariants.
68 68
    */
69  
-  @deprecated("use getUnitOf(s) or onUnitOf(s) instead")
  69
+  @deprecated("use getUnitOf(s) or onUnitOf(s) instead", "2.9.0")
70 70
   def unitOf(s: SourceFile): RichCompilationUnit = getOrCreateUnitOf(s)
71 71
 
72 72
   /** The compilation unit corresponding to a position */
73  
-  @deprecated("use getUnitOf(pos.source) or onUnitOf(pos.source) instead")
  73
+  @deprecated("use getUnitOf(pos.source) or onUnitOf(pos.source) instead", "2.9.0")
74 74
   def unitOf(pos: Position): RichCompilationUnit = getOrCreateUnitOf(pos.source)
75 75
 
76 76
   /** Removes the CompilationUnit corresponding to the given SourceFile
@@ -107,7 +107,7 @@ trait CompilerControl { self: Global =>
107 107
     if (item.onCompilerThread) item() else scheduler.postWorkItem(item)
108 108
 
109 109
   /** Makes sure a set of compilation units is loaded and parsed.
110  
-   *  Returns () to syncvar `response` on completions.
  110
+   *  Returns () to syncvar `response` on completion.
111 111
    *  Afterwards a new background compiler run is started with
112 112
    *  the given sources at the head of the list of to-be-compiled sources.
113 113
    */
@@ -120,6 +120,13 @@ trait CompilerControl { self: Global =>
120 120
     postWorkItem(new ReloadItem(sources, response))
121 121
   }
122 122
 
  123
+  /** Removes source files and toplevel symbols, and issues a new typer run.
  124
+   *  Returns () to syncvar `response` on completion.
  125
+   */
  126
+  def askFilesDeleted(sources: List[SourceFile], response: Response[Unit]) = {
  127
+    postWorkItem(new FilesDeletedItem(sources, response))
  128
+  }
  129
+
123 130
   /** Sets sync var `response` to the smallest fully attributed tree that encloses position `pos`.
124 131
    *  Note: Unlike for most other ask... operations, the source file belonging to `pos` needs not be be loaded.
125 132
    */
@@ -204,7 +211,7 @@ trait CompilerControl { self: Global =>
204 211
   /** Tells the compile server to shutdown, and not to restart again */
205 212
   def askShutdown() = scheduler raise ShutdownReq
206 213
 
207  
-  @deprecated("use parseTree(source) instead")
  214
+  @deprecated("use parseTree(source) instead", "2.9.0")
208 215
   def askParse(source: SourceFile, response: Response[Tree]) = respond(response) {
209 216
     parseTree(source)
210 217
   }
@@ -261,6 +268,11 @@ trait CompilerControl { self: Global =>
261 268
     override def toString = "reload "+sources
262 269
   }
263 270
 
  271
+  case class FilesDeletedItem(sources: List[SourceFile], response: Response[Unit]) extends WorkItem {
  272
+    def apply() = filesDeleted(sources, response)
  273
+    override def toString = "files deleted "+sources
  274
+  }
  275
+
264 276
   class AskTypeAtItem(val pos: Position, response: Response[Tree]) extends WorkItem {
265 277
     def apply() = self.getTypedTreeAt(pos, response)
266 278
     override def toString = "typeat "+pos.source+" "+pos.show
16  src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -578,6 +578,22 @@ class Global(settings: Settings, reporter: Reporter, projectName: String = "")
578 578
     demandNewCompilerRun()
579 579
   }
580 580
 
  581
+  private[interactive] def filesDeleted(sources: List[SourceFile], response: Response[Unit]) {
  582
+    informIDE("files deleted: " + sources)
  583
+    val deletedFiles = sources.map(_.file).toSet
  584
+    val deletedSyms = currentTopLevelSyms filter {sym => deletedFiles contains sym.sourceFile}
  585
+    for (d <- deletedSyms) {
  586
+      d.owner.info.decls unlink d
  587
+      deletedTopLevelSyms += d
  588
+      currentTopLevelSyms -= d
  589
+    }
  590
+    sources foreach (removeUnitOf(_))
  591
+    minRunId = currentRunId
  592
+    respond(response) ()
  593
+    demandNewCompilerRun()
  594
+  }
  595
+
  596
+
581 597
   /** A fully attributed tree located at position `pos` */
582 598
   private def typedTreeAt(pos: Position): Tree = getUnit(pos.source) match {
583 599
     case None =>
8  src/compiler/scala/tools/nsc/interpreter/ILoop.scala
@@ -51,10 +51,10 @@ class ILoop(in0: Option[BufferedReader], protected val out: PrintWriter)
51 51
   // TODO
52 52
   // object opt extends AestheticSettings
53 53
   //
54  
-  @deprecated("Use `intp` instead.")
  54
+  @deprecated("Use `intp` instead.", "2.9.0")
55 55
   def interpreter = intp
56 56
 
57  
-  @deprecated("Use `intp` instead.")
  57
+  @deprecated("Use `intp` instead.", "2.9.0")
58 58
   def interpreter_= (i: Interpreter): Unit = intp = i
59 59
 
60 60
   def history = in.history
@@ -835,14 +835,14 @@ class ILoop(in0: Option[BufferedReader], protected val out: PrintWriter)
835 835
     }
836 836
   }
837 837
 
838  
-  @deprecated("Use `process` instead")
  838
+  @deprecated("Use `process` instead", "2.9.0")
839 839
   def main(args: Array[String]): Unit = {
840 840
     if (isReplDebug)
841 841
       System.out.println(new java.util.Date)
842 842
 
843 843
     process(args)
844 844
   }
845  
-  @deprecated("Use `process` instead")
  845
+  @deprecated("Use `process` instead", "2.9.0")
846 846
   def main(settings: Settings): Unit = process(settings)
847 847
 }
848 848
 
2  src/compiler/scala/tools/nsc/interpreter/IMain.scala
@@ -162,7 +162,7 @@ class IMain(val settings: Settings, protected val out: PrintWriter) extends Impo
162 162
     if (_isInitialized()) _compiler
163 163
     else null
164 164
   }
165  
-  @deprecated("Use `global` for access to the compiler instance.")
  165
+  @deprecated("Use `global` for access to the compiler instance.", "2.9.0")
166 166
   lazy val compiler: global.type = global
167 167
 
168 168
   import global._
2  src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala
@@ -52,7 +52,7 @@ object InteractiveReader {
52 52
     }
53 53
 
54 54
   def apply(): InteractiveReader = SimpleReader()
55  
-  @deprecated("Use `apply` instead.")
  55
+  @deprecated("Use `apply` instead.", "2.9.0")
56 56
   def createDefault(): InteractiveReader = apply()
57 57
 }
58 58
 
1  src/compiler/scala/tools/nsc/matching/Matrix.scala
@@ -88,6 +88,7 @@ trait Matrix extends MatrixAdditions {
88 88
     context: MatrixContext): Tree =
89 89
   {
90 90
     import context._
  91
+    TRACE("handlePattern", "(%s: %s) match { %s cases }", selector, selector.tpe, cases.size)
91 92
 
92 93
     val matrixInit: MatrixInit = {
93 94
       val v = copyVar(selector, isChecked, selector.tpe, "temp")
105  src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
@@ -39,15 +39,16 @@ trait ParallelMatching extends ast.TreeDSL
39 39
 
40 40
     def data: MatrixContext#MatrixInit
41 41
 
42  
-    lazy val MatrixInit(roots, cases, failTree)  = data
43  
-    lazy val ExpandedMatrix(rows, targets)       = expand(roots, cases)
44  
-    lazy val expansion: Rep                      = make(roots, rows)
  42
+    lazy val MatrixInit(roots, cases, failTree) = data
  43
+    lazy val (rows, targets)                    = expand(roots, cases).unzip
  44
+    lazy val expansion: Rep                     = make(roots, rows)
45 45
 
46  
-    val shortCuts   = new ListBuffer[Symbol]()
  46
+    private val shortCuts = mutable.HashMap[Int, Symbol]()
47 47
 
48  
-    final def shortCut(theLabel: Symbol): Int = {
49  
-      shortCuts += theLabel
50  
-      -shortCuts.length
  48
+    final def createShortCut(theLabel: Symbol): Int = {
  49
+      val key = shortCuts.size + 1
  50
+      shortCuts(key) = theLabel
  51
+      -key
51 52
     }
52 53
 
53 54
     /** first time bx is requested, a LabelDef is returned. next time, a jump.
@@ -55,18 +56,25 @@ trait ParallelMatching extends ast.TreeDSL
55 56
      */
56 57
     final def requestBody(bx: Int, subst: Bindings): Tree = {
57 58
       // shortcut
58  
-      if (bx < 0) Apply(ID(shortCuts(-bx-1)), Nil)
  59
+      if (bx < 0) Apply(ID(shortCuts(-bx)), Nil)
59 60
       else targets(bx) labelBody subst
60 61
     }
61 62
 
62  
-    /** the injection here handles alternatives and unapply type tests */
63  
-    final def make(tvars: PatternVarGroup, row1: List[Row]): Rep = {
64  
-      // TRACE("make(%s%s)", pp(tvars.pvs, 1, true), pp(row1, 1, true))
65  
-      def classifyPat(opat: Pattern, j: Int): Pattern = opat simplify tvars(j)
  63
+    /** This is the recursively focal point for translating the current
  64
+     *  list of pattern variables and a list of pattern match rows into
  65
+     *  a tree suitable for entering erasure.
  66
+     *
  67
+     *  The first time it is called, the variables are (copies of) the
  68
+     *  original pattern matcher roots, and the rows correspond to the
  69
+     *  original casedefs.
  70
+     */
  71
+    final def make(roots1: PatternVarGroup, rows1: List[Row]): Rep = {
  72
+      traceCategory("New Match", "%sx%s (%s)", roots1.size, rows1.size, roots1.syms.mkString(", "))
  73
+      def classifyPat(opat: Pattern, j: Int): Pattern = opat simplify roots1(j)
66 74
 
67  
-      val rows = row1 flatMap (_ expandAlternatives classifyPat)
68  
-      if (rows.length != row1.length) make(tvars, rows)  // recursive call if any change
69  
-      else Rep(tvars, rows).checkExhaustive
  75
+      val newRows = rows1 flatMap (_ expandAlternatives classifyPat)
  76
+      if (rows1.length != newRows.length) make(roots1, newRows)  // recursive call if any change
  77
+      else Rep(roots1, newRows).checkExhaustive
70 78
     }
71 79
 
72 80
     override def toString() = "MatchMatrix(%s) { %s }".format(matchResultType, indentAll(targets))
@@ -182,17 +190,11 @@ trait ParallelMatching extends ast.TreeDSL
182 190
         }
183 191
       }
184 192
 
185  
-      object TypedUnapply {
186  
-        def unapply(x: Tree): Option[Boolean] = condOpt(x) {
187  
-          case Typed(UnapplyParamType(tpe), tpt) => !(tpt.tpe <:< tpe)
188  
-        }
189  
-      }
190  
-
191 193
       def mkRule(rest: Rep): RuleApplication = {
192 194
         tracing("Rule")(head match {
193 195
           case x if isEquals(x.tree.tpe)        => new MixEquals(this, rest)
194 196
           case x: SequencePattern               => new MixSequence(this, rest, x)
195  
-          case AnyUnapply(false)                => new MixUnapply(this, rest, false)
  197
+          case AnyUnapply(false)                => new MixUnapply(this, rest)
196 198
           case _ =>
197 199
             isPatternSwitch(scrut, ps) match {
198 200
               case Some(x)  => new MixLiteralInts(x, rest)
@@ -327,7 +329,7 @@ trait ParallelMatching extends ast.TreeDSL
327 329
 
328 330
     /** mixture rule for unapply pattern
329 331
      */
330  
-    class MixUnapply(val pmatch: PatternMatch, val rest: Rep, typeTest: Boolean) extends RuleApplication {
  332
+    class MixUnapply(val pmatch: PatternMatch, val rest: Rep) extends RuleApplication {
331 333
       val uapattern = head match { case x: UnapplyPattern => x ; case _ => abort("XXX") }
332 334
       val ua @ UnApply(app, args) = head.tree
333 335
 
@@ -494,7 +496,9 @@ trait ParallelMatching extends ast.TreeDSL
494 496
         val compareFn: Tree => Tree         = (t: Tree) => compareOp((t DOT methodOp)(LIT(pivotLen)), ZERO)
495 497
 
496 498
         // wrapping in a null check on the scrutinee
  499
+        // XXX this needs to use the logic in "def condition"
497 500
         nullSafe(compareFn, FALSE)(scrut.id)
  501
+        // condition(head.tpe, scrut.id, head.boundVariables.nonEmpty)
498 502
       }
499 503
       lazy val success  = squeezedBlock(pvs map (_.valDef), remake(successRows, pvs, hasStar).toTree)
500 504
       lazy val failure  = remake(failRows).toTree
@@ -521,7 +525,7 @@ trait ParallelMatching extends ast.TreeDSL
521 525
 
522 526
       lazy val success = remake(List(
523 527
         rest.rows.head.insert2(List(NoPattern), head.boundVariables, scrut.sym),
524  
-        Row(emptyPatterns(1 + rest.tvars.size), NoBinding, EmptyTree, shortCut(label))
  528
+        Row(emptyPatterns(1 + rest.tvars.size), NoBinding, EmptyTree, createShortCut(label))
525 529
       )).toTree
526 530
 
527 531
       lazy val failure = LabelDef(label, Nil, labelBody)
@@ -615,8 +619,6 @@ trait ParallelMatching extends ast.TreeDSL
615 619
     case class Row(pats: List[Pattern], subst: Bindings, guard: Tree, bx: Int) {
616 620
       private def nobindings = subst.get().isEmpty
617 621
       private def bindstr = if (nobindings) "" else pp(subst)
618  
-      // if (pats exists (p => !p.isDefault))
619  
-      //   traceCategory("Row", "%s%s", pats, bindstr)
620 622
 
621 623
       /** Extracts the 'i'th pattern. */
622 624
       def extractColumn(i: Int) = {
@@ -655,29 +657,6 @@ trait ParallelMatching extends ast.TreeDSL
655 657
       }
656 658
     }
657 659
 
658  
-    object ExpandedMatrix {
659  
-      def unapply(x: ExpandedMatrix) = Some((x.rows, x.targets))
660  
-      def apply(rowz: List[(Row, FinalState)]) =
661  
-        new ExpandedMatrix(rowz map (_._1), rowz map (_._2) toIndexedSeq)
662  
-    }
663  
-
664  
-    class ExpandedMatrix(val rows: List[Row], val targets: IndexedSeq[FinalState]) {
665  
-      require(rows.size == targets.size)
666  
-
667  
-      override def toString() = {
668  
-        def vprint(vs: List[Any]) = if (vs.isEmpty) "" else ": %s".format(pp(vs))
669  
-        def rprint(r: Row) = pp(r)
670  
-        def tprint(t: FinalState) =
671  
-          if (t.params.isEmpty) " ==> %s".format(pp(t.body))
672  
-          else " ==>\n        %s".format(pp(t.params -> t.body))
673  
-
674  
-        val xs = rows zip targets map { case (r,t) => rprint(r) + tprint(t) }
675  
-        val ppstr = pp(xs, newlines = true)
676  
-
677  
-        "ExpandedMatrix(%d rows)".format(rows.size) + ppstr
678  
-      }
679  
-    }
680  
-
681 660
     case class FinalState(bx: Int, body: Tree, params: List[Symbol]) {
682 661
       private var referenceCount = 0
683 662
       // typer is not able to digest a body of type Nothing being assigned result type Unit
@@ -762,21 +741,19 @@ trait ParallelMatching extends ast.TreeDSL
762 741
     }
763 742
 
764 743
     /** Expands the patterns recursively. */
765  
-    final def expand(roots: List[PatternVar], cases: List[CaseDef]) =
766  
-      tracing("Expanded")(ExpandedMatrix(
767  
-        for ((CaseDef(pat, guard, body), index) <- cases.zipWithIndex) yield {
768  
-          def mkRow(ps: List[Tree]) = Row(toPats(ps), NoBinding, guard, index)
769  
-
770  
-          val pattern = Pattern(pat)
771  
-          val row = mkRow(pat match {
772  
-            case x if roots.length <= 1 => List(x)
773  
-            case Apply(_, args)         => args
774  
-            case WILD()                 => emptyTrees(roots.length)
775  
-          })
776  
-
777  
-          row -> FinalState(index, body, pattern.deepBoundVariables)
778  
-        })
779  
-      )
  744
+    final def expand(roots: List[PatternVar], cases: List[CaseDef]) = tracing("expand") {
  745
+      for ((CaseDef(pat, guard, body), index) <- cases.zipWithIndex) yield {
  746
+        val subtrees = pat match {
  747
+          case x if roots.length <= 1 => List(x)
  748
+          case Apply(_, args)         => args
  749
+          case WILD()                 => emptyTrees(roots.length)
  750
+        }
  751
+        val row   = Row(toPats(subtrees), NoBinding, guard, index)
  752
+        val state = FinalState(index, body, Pattern(pat).deepBoundVariables)
  753
+
  754
+        row -> state
  755
+      }
  756
+    }
780 757
 
781 758
     /** returns the condition in "if (cond) k1 else k2"
782 759
      */
10  src/compiler/scala/tools/nsc/matching/PatternBindings.scala
@@ -89,8 +89,8 @@ trait PatternBindings extends ast.TreeDSL
89 89
     }
90 90
 
91 91
     // Wrap this pattern's bindings around (_: Type)
92  
-    def rebindToType(tpe: Type, annotatedType: Type = null): Pattern = {
93  
-      val aType = if (annotatedType == null) tpe else annotatedType
  92
+    def rebindToType(tpe: Type, ascription: Type = null): Pattern = {
  93
+      val aType = if (ascription == null) tpe else ascription
94 94
       rebindTo(Typed(WILD(tpe), TypeTree(aType)) setType tpe)
95 95
     }
96 96
 
@@ -104,10 +104,8 @@ trait PatternBindings extends ast.TreeDSL
104 104
 
105 105
     // Like rebindToEqualsCheck, but subtly different.  Not trying to be
106 106
     // mysterious -- I haven't sorted it all out yet.
107  
-    def rebindToObjectCheck(): Pattern = {
108  
-      val sType = sufficientType
109  
-      rebindToType(mkEqualsRef(sType), sType)
110  
-    }
  107
+    def rebindToObjectCheck(): Pattern =
  108
+      rebindToType(mkEqualsRef(sufficientType), sufficientType)
111 109
 
112 110
     /** Helpers **/
113 111
     private def wrapBindings(vs: List[Symbol], pat: Tree): Tree = vs match {
180  src/compiler/scala/tools/nsc/matching/Patterns.scala
@@ -27,6 +27,16 @@ trait Patterns extends ast.TreeDSL {
27 27
   type PatternMatch       = MatchMatrix#PatternMatch
28 28
   private type PatternVar = MatrixContext#PatternVar
29 29
 
  30
+  // private def unapplyArgs(x: Any) = x match {
  31
+  //   case UnApply(Apply(TypeApply(_, targs), args), _) => (targs map (_.symbol), args map (_.symbol))
  32
+  //   case _                                            => (Nil, Nil)
  33
+  // }
  34
+  //
  35
+  // private def unapplyCall(x: Any) = x match {
  36
+  //   case UnApply(t, _)  => treeInfo.methPart(t).symbol
  37
+  //   case _              => NoSymbol
  38
+  // }
  39
+
30 40
   // Fresh patterns
31 41
   def emptyPatterns(i: Int): List[Pattern] = List.fill(i)(NoPattern)
32 42
   def emptyTrees(i: Int): List[Tree] = List.fill(i)(EmptyTree)
@@ -45,14 +55,12 @@ trait Patterns extends ast.TreeDSL {
45 55
     val Ident(name) = tree
46 56
     require(isVarPattern(tree) && name != nme.WILDCARD)
47 57
 
48  
-    override def irrefutableFor(tpe: Type) = true
49 58
     override def description = "%s".format(name)
50 59
   }
51 60
 
52 61
   // 8.1.1 (b)
53 62
   case class WildcardPattern() extends Pattern {
54 63
     val tree = EmptyTree
55  
-    override def irrefutableFor(tpe: Type) = true
56 64
     override def isDefault = true
57 65
     override def description = "_"
58 66
   }
@@ -62,11 +70,9 @@ trait Patterns extends ast.TreeDSL {
62 70
     private val Typed(expr, tpt) = tree
63 71
 
64 72
     override def subpatternsForVars: List[Pattern] = List(Pattern(expr))
65  
-
66  
-    override def irrefutableFor(tpe: Type) = tpe <:< tree.tpe
67 73
     override def simplify(pv: PatternVar) = Pattern(expr) match {
68  
-      case ExtractorPattern(ua) if pv.sym.tpe <:< tpt.tpe  => this rebindTo expr
69  
-      case _                                                => this
  74
+      case ExtractorPattern(ua) if pv.sym.tpe <:< tpt.tpe => this rebindTo expr
  75
+      case _                                              => this
70 76
     }
71 77
     override def description = "Typ(%s: %s)".format(Pattern(expr), tpt)
72 78
   }
@@ -159,77 +165,67 @@ trait Patterns extends ast.TreeDSL {
159 165
       if (isColonColon) "%s :: %s".format(Pattern(args(0)), Pattern(args(1)))
160 166
       else "%s(%s)".format(name, toPats(args).mkString(", "))
161 167
     }
162  
-
163  
-    // XXX todo
164  
-    // override def irrefutableFor(tpe: Type) = false
165 168
   }
166 169
   // 8.1.6
167 170
   case class TuplePattern(tree: Apply) extends ApplyPattern {
168  
-    // XXX todo
169  
-    // override def irrefutableFor(tpe: Type) = false
170 171
     override def description = "((%s))".format(args.size, toPats(args).mkString(", "))
171 172
   }
172 173
 
173  
-  // 8.1.7
  174
+  // 8.1.7 / 8.1.8 (unapply and unapplySeq calls)
174 175
   case class ExtractorPattern(tree: UnApply) extends UnapplyPattern {
175  
-    private val Apply(fn, _) = unfn
176  
-    private val MethodType(List(arg, _*), _) = fn.tpe
177  
-    private def uaTyped = Typed(tree, TypeTree(arg.tpe)) setType arg.tpe
178  
-
179  
-    override def necessaryType = arg.tpe
180  
-
181 176
     override def simplify(pv: PatternVar) =
182  
-      if (pv.sym.tpe <:< arg.tpe) this
  177
+      if (pv.tpe <:< arg.tpe) this
183 178
       else this rebindTo uaTyped
184 179
 
185  
-    override def description = "UnApp(%s => %s)".format(necessaryType, resTypesString)
  180
+    override def description = "Unapply(%s => %s)".format(necessaryType, resTypesString)
186 181
   }
187 182
 
188  
-  // 8.1.8 (unapplySeq calls)
189  
-  case class SequenceExtractorPattern(tree: UnApply) extends UnapplyPattern with SequenceLikePattern {
  183
+  case class SequenceExtractorPattern(tree: UnApply, elems: List[Tree]) extends UnapplyPattern with SequenceLikePattern {
  184
+    override def simplify(pv: PatternVar) = {
  185
+      pv.sym setFlag NO_EXHAUSTIVE
190 186
 
191  
-    lazy val UnApply(
192  
-      Apply(TypeApply(Select(_, nme.unapplySeq), List(tptArg)), _),
193  
-      List(ArrayValue(_, elems))
194  
-    ) = tree
  187
+      if (pv.tpe <:< arg.tpe) this
  188
+      else this rebindTo uaTyped
  189
+    }
195 190
 
196  
-    /** For folding a list into a well-typed x :: y :: etc :: tree. */
197  
-    private def listFolder = {
198  
-      val tpe = tptArg.tpe
199  
-      val MethodType(_, TypeRef(pre, sym, _)) = ConsClass.primaryConstructor.tpe
200  
-      val consRef                             = typeRef(pre, sym, List(tpe))
201  
-      val listRef                             = typeRef(pre, ListClass, List(tpe))
  191
+    override def description = "UnapplySeq(%s => %s)".format(necessaryType, resTypesString)
  192
+  }
202 193
 
203  
-      def fold(x: Tree, xs: Tree) = unbind(x) match {
204  
-        case _: Star  => Pattern(x) rebindTo WILD(x.tpe) boundTree  // this is using boundVariables instead of deepBoundVariables
205  
-        case _        =>
206  
-          val dummyMethod = new TermSymbol(NoSymbol, NoPosition, "matching$dummy")
207  
-          val consType    = MethodType(dummyMethod newSyntheticValueParams List(tpe, listRef), consRef)
  194
+  // Special List handling.  It was like that when I got here.
  195
+  case class ListExtractorPattern(tree: UnApply, tpt: Tree, elems: List[Tree]) extends UnapplyPattern with SequenceLikePattern {
  196
+    private val cons    = ConsClass.primaryConstructor.tpe.resultType
  197
+    private val consRef = typeRef(cons.prefix, ConsClass, List(tpt.tpe))
  198
+    private val listRef = typeRef(cons.prefix, ListClass, List(tpt.tpe))
208 199
 
209  
-          Apply(TypeTree(consType), List(x, xs)) setType consRef
210  
-      }
  200
+    // Fold a list into a well-typed x :: y :: etc :: tree.
  201
+    private def listFolder(x: Tree, xs: Tree) = unbind(x) match {
  202
+      case _: Star  => Pattern(x) rebindTo WILD(x.tpe) boundTree
  203
+      case _        =>
  204
+        val dummyMethod = new TermSymbol(NoSymbol, NoPosition, "matching$dummy")
  205
+        val consType    = MethodType(dummyMethod newSyntheticValueParams List(tpt.tpe, listRef), consRef)
211 206
 
212  
-      fold _
  207
+        Apply(TypeTree(consType), List(x, xs)) setType consRef
213 208
     }
214  
-
215  
-    // @pre: is not right-ignoring (no star pattern) ; no exhaustivity check
  209
+    override def necessaryType = if (nonStarPatterns.nonEmpty) consRef else listRef
216 210
     override def simplify(pv: PatternVar) = {
217 211
       pv.sym setFlag NO_EXHAUSTIVE
218  
-      this rebindTo elems.foldRight(gen.mkNil)(listFolder)
  212
+
  213
+      if (pv.tpe <:< necessaryType)
  214
+        this rebindTo elems.foldRight(gen.mkNil)(listFolder)
  215
+      else
  216
+        this rebindTo (Typed(tree, TypeTree(necessaryType)) setType necessaryType)
219 217
     }
220  
-    override def description = "UnSeq(%s => %s)".format(tptArg, resTypesString)
  218
+    override def description = "List(%s => %s)".format(tpt.tpe, resTypesString)
221 219
   }
222 220
 
223 221
   trait SequenceLikePattern extends Pattern {
224 222
     def elems: List[Tree]
225  
-    def elemPatterns = toPats(elems)
226  
-
227  
-    def nonStarPatterns: List[Pattern] = if (hasStar) elemPatterns.init else elemPatterns
228  
-    def nonStarLength = nonStarPatterns.length
229  
-    def isAllDefaults = nonStarPatterns forall (_.isDefault)
  223
+    override def hasStar = elems.nonEmpty && isStar(elems.last)
230 224
 
231  
-    def isShorter(other: SequenceLikePattern) = nonStarLength < other.nonStarLength
232  
-    def isSameLength(other: SequenceLikePattern) = nonStarLength == other.nonStarLength
  225
+    def elemPatterns    = toPats(elems)
  226
+    def nonStarElems    = if (hasStar) elems.init else elems
  227
+    def nonStarPatterns = toPats(nonStarElems)
  228
+    def nonStarLength   = nonStarElems.length
233 229
   }
234 230
 
235 231
   // 8.1.8 (b) (literal ArrayValues)
@@ -273,16 +269,6 @@ trait Patterns extends ast.TreeDSL {
273 269
     private val cache = new collection.mutable.HashMap[Tree, Pattern]
274 270
     def clear() = cache.clear()
275 271
 
276  
-    def unadorn(x: Tree): Tree = x match {
277  
-      case Typed(expr, _) => unadorn(expr)
278  
-      case Bind(_, x)     => unadorn(x)
279  
-      case _              => x
280  
-    }
281  
-
282  
-    def isRightIgnoring(t: Tree) = cond(unadorn(t)) {
283  
-      case ArrayValue(_, xs) if !xs.isEmpty => isStar(unadorn(xs.last))
284  
-    }
285  
-
286 272
     def apply(tree: Tree): Pattern = {
287 273
       if (cache contains tree)
288 274
         return cache(tree)
@@ -321,21 +307,22 @@ trait Patterns extends ast.TreeDSL {
321 307
 
322 308
   object UnapplyPattern {
323 309
     private object UnapplySeq {
324  
-      private object TypeApp {
325  
-        def unapply(x: Any) = condOpt(x) {
326  
-          case TypeApply(sel @ Select(stor, nme.unapplySeq), List(tpe)) if stor.symbol eq ListModule => tpe
327  
-        }
328  
-      }
329  
-      def unapply(x: UnApply) = condOpt(x) {
330  
-        case UnApply(Apply(TypeApp(tptArg), _), List(ArrayValue(_, xs))) => (tptArg, xs)
331  
-      }
  310
+      def unapply(x: UnApply) = x match {
  311
+        case UnApply(
  312
+        Apply(TypeApply(Select(qual, nme.unapplySeq), List(tpt)), _),
  313
+        List(ArrayValue(_, elems))) =>
  314
+          Some(qual.symbol, tpt, elems)
  315
+        case _ =>
  316
+          None
  317
+       }
332 318
     }
333 319
 
334  
-    def apply(x: UnApply): Pattern = {
335  
-      x match {
336  
-        case UnapplySeq(_, _) => SequenceExtractorPattern(x)
337  
-        case _                => ExtractorPattern(x)
338  
-      }
  320
+    def apply(x: UnApply): Pattern = x match {
  321
+      case UnapplySeq(container, tpt, elems) =>
  322
+        if (container == ListModule) ListExtractorPattern(x, tpt, elems)
  323
+        else SequenceExtractorPattern(x, elems)
  324
+      case _ =>
  325
+        ExtractorPattern(x)
339 326
     }
340 327
   }
341 328
 
@@ -401,7 +388,15 @@ trait Patterns extends ast.TreeDSL {
401 388
 
402 389
   sealed trait UnapplyPattern extends Pattern {
403 390
     lazy val UnApply(unfn, args) = tree
404  
-    override def subpatternsForVars: List[Pattern] = toPats(args)
  391
+    lazy val Apply(fn, _) = unfn
  392
+    lazy val MethodType(List(arg, _*), _) = fn.tpe
  393
+    protected def uaTyped = Typed(tree, TypeTree(arg.tpe)) setType arg.tpe
  394
+
  395
+    override def necessaryType = arg.tpe
  396
+    override def subpatternsForVars = args match {
  397
+      case List(ArrayValue(elemtpe, elems)) => toPats(elems)
  398
+      case _                                => toPats(args)
  399
+    }
405 400
 
406 401
     def resTypes = analyzer.unapplyTypeList(unfn.symbol, unfn.tpe)
407 402
     def resTypesString = resTypes match {
@@ -433,23 +428,10 @@ trait Patterns extends ast.TreeDSL {
433 428
 
434 429
     // returns either a simplification of this pattern or identity.
435 430
     def simplify(pv: PatternVar): Pattern = this
436  
-    def simplify(): Pattern = this simplify null
437 431
 
438 432
     // the right number of dummies for this pattern
439 433
     def dummies: List[Pattern] = Nil
440 434
 
441  
-    // 8.1.13
442  
-    // A pattern p is irrefutable for type T if any of the following applies:
443  
-    //   1) p is a variable pattern
444  
-    //   2) p is a typed pattern x: T', and T <: T'
445  
-    //   3) p is a constructor pattern C(p1,...,pn), the type T is an instance of class C,
446  
-    //      the primary constructor of type T has argument types T1,...,Tn and and each
447  
-    //      pi is irrefutable for Ti.
448  
-    def irrefutableFor(tpe: Type) = false
449  
-
450  
-    // does this pattern completely cover that pattern (i.e. latter cannot be matched)
451  
-    def completelyCovers(second: Pattern) = false
452  
-
453 435
     // Is this a default pattern (untyped "_" or an EmptyTree inserted by the matcher)
454 436
     def isDefault = false
455 437
 
@@ -460,34 +442,18 @@ trait Patterns extends ast.TreeDSL {
460 442
     // (nullness and guards will still be checked.)
461 443
     def sufficientType = tpe
462 444
 
463  
-    // XXX have to determine if this can be made useful beyond an extractor barrier.
464  
-    // Default sufficient type might be NothingClass.tpe, tpe.narrow, ...
465  
-
466 445
     // the subpatterns for this pattern (at the moment, that means constructor arguments)
467 446
     def subpatterns(pm: MatchMatrix#PatternMatch): List[Pattern] = pm.dummies
468 447
 
469 448
     def    sym  = tree.symbol
470 449
     def    tpe  = tree.tpe
471  
-    def prefix  = tpe.prefix
472 450
     def isEmpty = tree.isEmpty
473 451
 
474  
-    def isSymValid = (sym != null) && (sym != NoSymbol)
475  
-    def isModule = sym.isModule || tpe.termSymbol.isModule
  452
+    def isModule    = sym.isModule || tpe.termSymbol.isModule
476 453
     def isCaseClass = tpe.typeSymbol.isCase
477  
-    def isObject = isSymValid && prefix.isStable  // XXX not entire logic
  454
+    def isObject    = (sym != null) && (sym != NoSymbol) && tpe.prefix.isStable  // XXX not entire logic
478 455
 
479  
-    def unadorn(t: Tree): Tree = Pattern unadorn t
480  
-
481  
-    private def isStar(x: Tree) = cond(unadorn(x)) { case Star(_) => true }
482  
-    private def endsStar(xs: List[Tree]) = xs.nonEmpty && isStar(xs.last)
483  
-
484  
-    def isStarSequence = isSequence && hasStar
485  
-    def isSequence = cond(unadorn(tree)) {
486  
-      case ArrayValue(_, _) => true
487  
-    }
488  
-    def hasStar = cond(unadorn(tree)) {
489  
-      case ArrayValue(_, xs) if endsStar(xs)  => true
490  
-    }
  456
+    def hasStar = false
491 457
 
492 458
     def setType(tpe: Type): this.type = {
493 459
       tree setType tpe
4  src/compiler/scala/tools/nsc/package.scala
@@ -6,8 +6,8 @@
6 6
 package scala.tools
7 7
 
8 8
 package object nsc {
9  
-  @deprecated("Use a class in the scala.tools.nsc.interpreter package.")
  9
+  @deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0")
10 10
   type InterpreterSettings = interpreter.ISettings
11  
-  @deprecated("Use a class in the scala.tools.nsc.interpreter package.")
  11
+  @deprecated("Use a class in the scala.tools.nsc.interpreter package.", "2.9.0")
12 12
   val InterpreterResults   = interpreter.Results
13 13
 }
8  src/compiler/scala/tools/nsc/symtab/Definitions.scala
@@ -217,6 +217,7 @@ trait Definitions extends reflect.generic.StandardDefinitions {
217 217
     lazy val ScalaInlineClass           = getClass("scala.inline")
218 218
     lazy val ScalaNoInlineClass         = getClass("scala.noinline")
219 219
     lazy val SpecializedClass           = getClass("scala.specialized")
  220
+    lazy val BridgeClass                = getClass("scala.annotation.bridge")
220 221
 
221 222
     // fundamental reference classes
222 223
     lazy val ScalaObjectClass     = getClass("scala.ScalaObject")
@@ -607,6 +608,13 @@ trait Definitions extends reflect.generic.StandardDefinitions {
607 608
       result
608 609
     }
609 610
 
  611
+    def getClassIfDefined(fullname: Name): Symbol =
  612
+      try {
  613
+        getClass(fullname)
  614
+      } catch {
  615
+        case ex: MissingRequirementError => NoSymbol
  616
+      }
  617
+
610 618
     def getMember(owner: Symbol, name: Name): Symbol = {
611 619
       if (owner == NoSymbol) NoSymbol
612 620
       else owner.info.nonPrivateMember(name) match {
2  src/compiler/scala/tools/nsc/symtab/Names.scala
@@ -120,7 +120,7 @@ trait Names extends reflect.generic.Names {
120 120
   def isTypeName(name: Name): Boolean = name.isTypeName
121 121
 
122 122
   def nameChars: Array[Char] = chrs
123  
-  @deprecated("") def view(s: String): TermName = newTermName(s)
  123
+  @deprecated("", "2.9.0") def view(s: String): TermName = newTermName(s)
124 124
 
125 125
 // Classes ----------------------------------------------------------------------
126 126
 
4  src/compiler/scala/tools/nsc/symtab/Symbols.scala
@@ -1579,10 +1579,6 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable =>
1579 1579
      */
1580 1580
     def nameString: String = decodedName + idString
1581 1581
 
1582  
-    /** The name of the symbol before decoding, e.g. `$eq$eq` instead of `==`.
1583  
-     */
1584  
-    def encodedName: String = name.toString
1585  
-
1586 1582
     /** If settings.uniqid is set, the symbol's id, else "" */
1587 1583
     final def idString: String =
1588 1584
       if (settings.uniqid.value) "#"+id // +" in "+owner.name+"#"+owner.id // DEBUG
8  src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
@@ -58,8 +58,12 @@ abstract class AddInterfaces extends InfoTransform {
58 58
   private def isInterfaceMember(sym: Symbol): Boolean = {
59 59
     sym.isType ||
60 60
     { sym.info; // to set lateMETHOD flag if necessary
61  
-      sym.isMethod && !sym.isLabel && !(sym hasFlag (PRIVATE | BRIDGE)) &&
62  
-      !sym.isConstructor && !sym.isImplOnly
  61
+      sym.isMethod &&
  62
+      !sym.isLabel &&
  63
+      !(sym hasFlag PRIVATE) &&
  64
+      (!(sym hasFlag BRIDGE) || (sym hasAnnotation BridgeClass)) && // count @_$bridge$_ annotated classes as interface members
  65
+      !sym.isConstructor &&
  66
+      !sym.isImplOnly
63 67
     }
64 68
   }
65 69
 
24  src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
@@ -68,6 +68,13 @@ abstract class ExplicitOuter extends InfoTransform
68 68
     result
69 69
   }
70 70
 
  71
+  class RemoveBindingsTransformer(toRemove: Set[Symbol]) extends Transformer {
  72
+    override def transform(tree: Tree) = tree match {
  73
+      case Bind(_, body) if toRemove(tree.symbol) => super.transform(body)
  74
+      case _                                      => super.transform(tree)
  75
+    }
  76
+  }
  77
+
71 78
   /** Issue a migration warning for instance checks which might be on an Array and
72 79
    *  for which the type parameter conforms to Seq, because these answers changed in 2.8.
73 80
    */
@@ -374,18 +381,23 @@ abstract class ExplicitOuter extends InfoTransform
374 381
 
375 382
       val nguard = new ListBuffer[Tree]
376 383
       val ncases =
377  
-        for (CaseDef(p, guard, b) <- cases) yield {
  384
+        for (CaseDef(pat, guard, body) <- cases) yield {
  385
+          // Strip out any unused pattern bindings up front
  386
+          val patternIdents = for (b @ Bind(_, _) <- pat) yield b.symbol
  387
+          val references: Set[Symbol] = Set(guard, body) flatMap { t => for (id @ Ident(name) <- t) yield id.symbol }
  388
+          val (used, unused) = patternIdents partition references
  389
+          val strippedPat = if (unused.isEmpty) pat else new RemoveBindingsTransformer(unused.toSet) transform pat
  390
+
378 391
           val gdcall =
379 392
             if (guard == EmptyTree) EmptyTree
380 393
             else {
381  
-              val vs       = Pattern(p).deepBoundVariables
382  
-              val guardDef = makeGuardDef(vs, guard)
383  
-              nguard       += transform(guardDef) // building up list of guards
  394
+              val guardDef = makeGuardDef(used, guard)
  395
+              nguard += transform(guardDef) // building up list of guards
384 396
 
385  
-              localTyper typed (Ident(guardDef.symbol) APPLY (vs map Ident))
  397
+              localTyper typed (Ident(guardDef.symbol) APPLY (used map Ident))
386 398
             }
387 399
 
388  
-          (CASE(transform(p)) IF gdcall) ==> transform(b)
  400
+          (CASE(transform(strippedPat)) IF gdcall) ==> transform(body)
389 401
         }
390 402
 
391 403
       def isUncheckedAnnotation(tpe: Type) = tpe hasAnnotation UncheckedClass
6  src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -232,7 +232,7 @@ trait Infer {
232 232
     }
233 233
 
234 234
     def explainTypes(tp1: Type, tp2: Type) =
235  
-      withDisambiguation(tp1, tp2)(global.explainTypes(tp1, tp2))
  235
+      withDisambiguation(List(), tp1, tp2)(global.explainTypes(tp1, tp2))
236 236
 
237 237
     /* -- Tests & Checks---------------------------------------------------- */
238 238
 
@@ -1506,7 +1506,7 @@ trait Infer {
1506 1506
           secondTry = true
1507 1507
         }
1508 1508
         def improves(sym1: Symbol, sym2: Symbol): Boolean =
1509  
-          sym2 == NoSymbol ||
  1509
+          sym2 == NoSymbol || sym2.hasAnnotation(BridgeClass) ||
1510 1510
           { val tp1 = pre.memberType(sym1)
1511 1511
             val tp2 = pre.memberType(sym2)
1512 1512
             (tp2 == ErrorType ||
@@ -1596,7 +1596,7 @@ trait Infer {
1596 1596
 
1597 1597
           def improves(sym1: Symbol, sym2: Symbol) =
1598 1598
 //            util.trace("improve "+sym1+sym1.locationString+" on "+sym2+sym2.locationString)(
1599  
-            sym2 == NoSymbol || sym2.isError ||
  1599
+            sym2 == NoSymbol || sym2.isError || sym2.hasAnnotation(BridgeClass) ||
1600 1600
             isStrictlyMoreSpecific(followApply(pre.memberType(sym1)),
1601 1601
                                    followApply(pre.memberType(sym2)), sym1, sym2)
1602 1602
 
25  src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -454,6 +454,8 @@ trait Namers { self: Analyzer =>
454 454
             finishWith(tparams)
455 455
           case DefDef(mods, name, tparams, _, _, _) =>
456 456
             tree.symbol = enterNewMethod(tree, name, mods.flags, mods, tree.pos)
  457
+            if (mods.annotations.exists(ann => isAnn(ann, "bridge")))
  458
+              tree.symbol setFlag BRIDGE