Skip to content

Commit fbeceb8

Browse files
committed
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.
1 parent ee51b6e commit fbeceb8

File tree

7 files changed

+9
-17
lines changed

7 files changed

+9
-17
lines changed

src/compiler/scala/reflect/internal/NameManglers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ trait NameManglers {
8080
val TRAIT_SETTER_SEPARATOR_STRING = "$_setter_$"
8181
val SETTER_SUFFIX: TermName = encode("_=")
8282

83-
@deprecated("2.10.0", "Use SPECIALIZED_SUFFIX")
83+
@deprecated("Use SPECIALIZED_SUFFIX", "2.10.0")
8484
def SPECIALIZED_SUFFIX_STRING = SPECIALIZED_SUFFIX.toString
85-
@deprecated("2.10.0", "Use SPECIALIZED_SUFFIX")
85+
@deprecated("Use SPECIALIZED_SUFFIX", "2.10.0")
8686
def SPECIALIZED_SUFFIX_NAME: TermName = SPECIALIZED_SUFFIX.toTermName
8787

8888
def isConstructorName(name: Name) = name == CONSTRUCTOR || name == MIXIN_CONSTRUCTOR

src/compiler/scala/reflect/internal/SymbolTable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class SymbolTable extends api.Universe
3737
def log(msg: => AnyRef): Unit
3838
def abort(msg: String): Nothing = throw new FatalError(supplementErrorMessage(msg))
3939

40-
@deprecated("2.10.0", "Give us a reason")
40+
@deprecated("Give us a reason", "2.10.0")
4141
def abort(): Nothing = abort("unknown error")
4242

4343
/** Override with final implementation for inlining. */

src/compiler/scala/reflect/internal/Symbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
15981598
else owner.logicallyEnclosingMember
15991599

16001600
/** Kept for source compatibility with 2.9. Scala IDE for Eclipse relies on this. */
1601-
@deprecated("Use enclosingTopLevelClass")
1601+
@deprecated("Use enclosingTopLevelClass", "2.10.0")
16021602
def toplevelClass: Symbol = enclosingTopLevelClass
16031603

16041604
/** The top-level class containing this symbol. */

src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@ trait ContextErrors {
442442
def UnexpectedTreeAnnotationError(tree: Tree, unexpected: Tree) =
443443
NormalTypeError(tree, "unexpected tree after typing annotation: "+ unexpected)
444444

445-
// TODO no test case
446445
//typedExistentialTypeTree
447446
def AbstractionFromVolatileTypeError(vd: ValDef) =
448447
issueNormalTypeError(vd, "illegal abstraction from value with volatile type "+vd.symbol.tpe)
@@ -465,8 +464,7 @@ trait ContextErrors {
465464
def TooManyArgsNamesDefaultsError(tree: Tree, fun: Tree) =
466465
NormalTypeError(tree, "too many arguments for "+treeSymTypeMsg(fun))
467466

468-
// can it still happen? see test case neg/t960.scala
469-
// TODO no test case
467+
// can it still happen? see test case neg/overloaded-unapply.scala
470468
def OverloadedUnapplyError(tree: Tree) =
471469
issueNormalTypeError(tree, "cannot resolve overloaded unapply")
472470

@@ -499,7 +497,6 @@ trait ContextErrors {
499497
}
500498

501499
//doTypedApply - patternMode
502-
// TODO: missing test case
503500
def TooManyArgsPatternError(fun: Tree) =
504501
NormalTypeError(fun, "too many arguments for unapply pattern, maximum = "+definitions.MaxTupleArity)
505502

@@ -541,7 +538,6 @@ trait ContextErrors {
541538
"illegal inheritance;\n self-type "+selfType+" does not conform to "+
542539
parent +"'s selftype "+parent.tpe.typeOfThis)
543540

544-
// TODO: missing test case
545541
def ParentInheritedTwiceError(parent: Tree, parentSym: Symbol) =
546542
NormalTypeError(parent, parentSym+" is inherited twice")
547543

@@ -572,7 +568,6 @@ trait ContextErrors {
572568
setError(tree)
573569
}
574570

575-
//TODO Needs test case
576571
def ConstructorPrefixError(tree: Tree, restpe: Type) = {
577572
issueNormalTypeError(tree, restpe.prefix+" is not a legal prefix for a constructor")
578573
setError(tree)
@@ -597,7 +592,6 @@ trait ContextErrors {
597592
setError(tree)
598593
}
599594

600-
// TODO needs test case
601595
// cases where we do not necessarily return trees
602596
def DependentMethodTpeConversionToFunctionError(tree: Tree, tp: Type) =
603597
issueNormalTypeError(tree, "method with dependent type "+tp+" cannot be converted to function value")
@@ -606,11 +600,9 @@ trait ContextErrors {
606600
def StarPatternWithVarargParametersError(tree: Tree) =
607601
issueNormalTypeError(tree, "star patterns must correspond with varargs parameters")
608602

609-
// TODO missing test case
610603
def FinitaryError(tparam: Symbol) =
611604
issueSymbolTypeError(tparam, "class graph is not finitary because type parameter "+tparam.name+" is expansively recursive")
612605

613-
// TODO missing test case for a second case
614606
def QualifyingClassError(tree: Tree, qual: Name) = {
615607
issueNormalTypeError(tree,
616608
if (qual.isEmpty) tree + " can be used only in a class, object, or template"

src/library/scala/collection/parallel/Tasks.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ object ThreadPoolTasks {
359359

360360

361361
/** An implementation of tasks objects based on the Java thread pooling API and synchronization using futures. */
362-
@deprecated("This implementation is not used.")
362+
@deprecated("This implementation is not used.", "2.10.0")
363363
trait FutureThreadPoolTasks extends Tasks {
364364
import java.util.concurrent._
365365

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
t960.scala:18: error: ambiguous reference to overloaded definition,
1+
overloaded-unapply.scala:18: error: ambiguous reference to overloaded definition,
22
both method unapply in object List of type [a](xs: List[a])Option[Null]
33
and method unapply in object List of type [a](xs: List[a])Option[(a, List[a])]
44
match argument types (List[a])
55
case List(x, xs) => 7
66
^
7-
t960.scala:22: error: cannot resolve overloaded unapply
7+
overloaded-unapply.scala:22: error: cannot resolve overloaded unapply
88
case List(x, xs) => 7
99
^
10-
t960.scala:12: error: method unapply is defined twice in t960.scala
10+
overloaded-unapply.scala:12: error: method unapply is defined twice in overloaded-unapply.scala
1111
def unapply[a](xs: List[a]): Option[Null] = xs match {
1212
^
1313
three errors found
File renamed without changes.

0 commit comments

Comments
 (0)