Skip to content

Commit e6fd1bb

Browse files
committed
Updated comment
1 parent e33a738 commit e6fd1bb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dotty/tools/dotc/typer/VarianceChecker.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ import Types._, Contexts._, Flags._, Symbols._, Annotations._, Trees._, NameOps.
77
import Decorators._
88
import Variances._
99

10+
/** Provides `check` method to check that all top-level definitions
11+
* in tree are variance correct. Does not recurse inside methods.
12+
* The method should be invoked once for each Template.
13+
*/
1014
object VarianceChecker {
1115
private case class VarianceError(tvar: Symbol, required: Variance)
1216
def check(tree: tpd.Tree)(implicit ctx: Context) =
1317
new VarianceChecker()(ctx).Traverser.traverse(tree)
1418
}
1519

16-
/** See comments at scala.reflect.internal.Variance.
17-
*/
1820
class VarianceChecker()(implicit ctx: Context) {
1921
import VarianceChecker._
2022
import tpd._

0 commit comments

Comments
 (0)