summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2012-03-12 17:20:06 +0100
committerSimon Ochsenreither <simon@ochsenreither.de>2012-03-12 20:33:12 +0100
commitfbeceb8f38f0a02bbfcc03ddbb0aea15dfa2f63a (patch)
treebb286056afd84151215c65241ad20ac09bd674c0
parentee51b6e1b1bc4bd60e6f6bbaea6eb3d4be8b3c97 (diff)
downloadscala-fbeceb8f38f0a02bbfcc03ddbb0aea15dfa2f63a.tar.gz
scala-fbeceb8f38f0a02bbfcc03ddbb0aea15dfa2f63a.tar.bz2
scala-fbeceb8f38f0a02bbfcc03ddbb0aea15dfa2f63a.zip
Removed "Todo: test" where a test exists.
- Renamed t960 to a more sensible name, because SI-960 is not related to the test and I couldn't find a ticket number. - Some minor fixes to @deprecated like switched or missing versions.
-rw-r--r--src/compiler/scala/reflect/internal/NameManglers.scala4
-rw-r--r--src/compiler/scala/reflect/internal/SymbolTable.scala2
-rw-r--r--src/compiler/scala/reflect/internal/Symbols.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala10
-rw-r--r--src/library/scala/collection/parallel/Tasks.scala2
-rw-r--r--test/files/neg/overloaded-unapply.check (renamed from test/files/neg/t960.check)6
-rw-r--r--test/files/neg/overloaded-unapply.scala (renamed from test/files/neg/t960.scala)0
7 files changed, 9 insertions, 17 deletions
diff --git a/src/compiler/scala/reflect/internal/NameManglers.scala b/src/compiler/scala/reflect/internal/NameManglers.scala
index 12f56976c9..48f21721da 100644
--- a/src/compiler/scala/reflect/internal/NameManglers.scala
+++ b/src/compiler/scala/reflect/internal/NameManglers.scala
@@ -80,9 +80,9 @@ trait NameManglers {
val TRAIT_SETTER_SEPARATOR_STRING = "$_setter_$"
val SETTER_SUFFIX: TermName = encode("_=")
- @deprecated("2.10.0", "Use SPECIALIZED_SUFFIX")
+ @deprecated("Use SPECIALIZED_SUFFIX", "2.10.0")
def SPECIALIZED_SUFFIX_STRING = SPECIALIZED_SUFFIX.toString
- @deprecated("2.10.0", "Use SPECIALIZED_SUFFIX")
+ @deprecated("Use SPECIALIZED_SUFFIX", "2.10.0")
def SPECIALIZED_SUFFIX_NAME: TermName = SPECIALIZED_SUFFIX.toTermName
def isConstructorName(name: Name) = name == CONSTRUCTOR || name == MIXIN_CONSTRUCTOR
diff --git a/src/compiler/scala/reflect/internal/SymbolTable.scala b/src/compiler/scala/reflect/internal/SymbolTable.scala
index ce54c32273..e13341e105 100644
--- a/src/compiler/scala/reflect/internal/SymbolTable.scala
+++ b/src/compiler/scala/reflect/internal/SymbolTable.scala
@@ -37,7 +37,7 @@ abstract class SymbolTable extends api.Universe
def log(msg: => AnyRef): Unit
def abort(msg: String): Nothing = throw new FatalError(supplementErrorMessage(msg))
- @deprecated("2.10.0", "Give us a reason")
+ @deprecated("Give us a reason", "2.10.0")
def abort(): Nothing = abort("unknown error")
/** Override with final implementation for inlining. */
diff --git a/src/compiler/scala/reflect/internal/Symbols.scala b/src/compiler/scala/reflect/internal/Symbols.scala
index 446dbad03f..7464e678e6 100644
--- a/src/compiler/scala/reflect/internal/Symbols.scala
+++ b/src/compiler/scala/reflect/internal/Symbols.scala
@@ -1598,7 +1598,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
else owner.logicallyEnclosingMember
/** Kept for source compatibility with 2.9. Scala IDE for Eclipse relies on this. */
- @deprecated("Use enclosingTopLevelClass")
+ @deprecated("Use enclosingTopLevelClass", "2.10.0")
def toplevelClass: Symbol = enclosingTopLevelClass
/** The top-level class containing this symbol. */
diff --git a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
index d7b4171c65..e511653cca 100644
--- a/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
@@ -442,7 +442,6 @@ trait ContextErrors {
def UnexpectedTreeAnnotationError(tree: Tree, unexpected: Tree) =
NormalTypeError(tree, "unexpected tree after typing annotation: "+ unexpected)
- // TODO no test case
//typedExistentialTypeTree
def AbstractionFromVolatileTypeError(vd: ValDef) =
issueNormalTypeError(vd, "illegal abstraction from value with volatile type "+vd.symbol.tpe)
@@ -465,8 +464,7 @@ trait ContextErrors {
def TooManyArgsNamesDefaultsError(tree: Tree, fun: Tree) =
NormalTypeError(tree, "too many arguments for "+treeSymTypeMsg(fun))
- // can it still happen? see test case neg/t960.scala
- // TODO no test case
+ // can it still happen? see test case neg/overloaded-unapply.scala
def OverloadedUnapplyError(tree: Tree) =
issueNormalTypeError(tree, "cannot resolve overloaded unapply")
@@ -499,7 +497,6 @@ trait ContextErrors {
}
//doTypedApply - patternMode
- // TODO: missing test case
def TooManyArgsPatternError(fun: Tree) =
NormalTypeError(fun, "too many arguments for unapply pattern, maximum = "+definitions.MaxTupleArity)
@@ -541,7 +538,6 @@ trait ContextErrors {
"illegal inheritance;\n self-type "+selfType+" does not conform to "+
parent +"'s selftype "+parent.tpe.typeOfThis)
- // TODO: missing test case
def ParentInheritedTwiceError(parent: Tree, parentSym: Symbol) =
NormalTypeError(parent, parentSym+" is inherited twice")
@@ -572,7 +568,6 @@ trait ContextErrors {
setError(tree)
}
- //TODO Needs test case
def ConstructorPrefixError(tree: Tree, restpe: Type) = {
issueNormalTypeError(tree, restpe.prefix+" is not a legal prefix for a constructor")
setError(tree)
@@ -597,7 +592,6 @@ trait ContextErrors {
setError(tree)
}
- // TODO needs test case
// cases where we do not necessarily return trees
def DependentMethodTpeConversionToFunctionError(tree: Tree, tp: Type) =
issueNormalTypeError(tree, "method with dependent type "+tp+" cannot be converted to function value")
@@ -606,11 +600,9 @@ trait ContextErrors {
def StarPatternWithVarargParametersError(tree: Tree) =
issueNormalTypeError(tree, "star patterns must correspond with varargs parameters")
- // TODO missing test case
def FinitaryError(tparam: Symbol) =
issueSymbolTypeError(tparam, "class graph is not finitary because type parameter "+tparam.name+" is expansively recursive")
- // TODO missing test case for a second case
def QualifyingClassError(tree: Tree, qual: Name) = {
issueNormalTypeError(tree,
if (qual.isEmpty) tree + " can be used only in a class, object, or template"
diff --git a/src/library/scala/collection/parallel/Tasks.scala b/src/library/scala/collection/parallel/Tasks.scala
index 60a8bb1ed6..4a581f219e 100644
--- a/src/library/scala/collection/parallel/Tasks.scala
+++ b/src/library/scala/collection/parallel/Tasks.scala
@@ -359,7 +359,7 @@ object ThreadPoolTasks {
/** An implementation of tasks objects based on the Java thread pooling API and synchronization using futures. */
-@deprecated("This implementation is not used.")
+@deprecated("This implementation is not used.", "2.10.0")
trait FutureThreadPoolTasks extends Tasks {
import java.util.concurrent._
diff --git a/test/files/neg/t960.check b/test/files/neg/overloaded-unapply.check
index 603b1cb032..1da93f6939 100644
--- a/test/files/neg/t960.check
+++ b/test/files/neg/overloaded-unapply.check
@@ -1,13 +1,13 @@
-t960.scala:18: error: ambiguous reference to overloaded definition,
+overloaded-unapply.scala:18: error: ambiguous reference to overloaded definition,
both method unapply in object List of type [a](xs: List[a])Option[Null]
and method unapply in object List of type [a](xs: List[a])Option[(a, List[a])]
match argument types (List[a])
case List(x, xs) => 7
^
-t960.scala:22: error: cannot resolve overloaded unapply
+overloaded-unapply.scala:22: error: cannot resolve overloaded unapply
case List(x, xs) => 7
^
-t960.scala:12: error: method unapply is defined twice in t960.scala
+overloaded-unapply.scala:12: error: method unapply is defined twice in overloaded-unapply.scala
def unapply[a](xs: List[a]): Option[Null] = xs match {
^
three errors found
diff --git a/test/files/neg/t960.scala b/test/files/neg/overloaded-unapply.scala
index 36909626c1..36909626c1 100644
--- a/test/files/neg/t960.scala
+++ b/test/files/neg/overloaded-unapply.scala