aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorOndrej Lhotak <olhotak@uwaterloo.ca>2015-01-14 17:38:32 +0100
committerOndrej Lhotak <olhotak@uwaterloo.ca>2015-01-14 20:15:33 +0100
commit01e19323ee602136b47800c5c4b4105299e573b2 (patch)
treec6f42912a720d209f8d375ed33be479a6e11915f /src/dotty/tools/dotc/core/Types.scala
parentdbecebad3180cfc3ba441ac49710b49a819a4b7d (diff)
downloaddotty-01e19323ee602136b47800c5c4b4105299e573b2.tar.gz
dotty-01e19323ee602136b47800c5c4b4105299e573b2.tar.bz2
dotty-01e19323ee602136b47800c5c4b4105299e573b2.zip
clarify comment about TypeVar
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 1dce544ca..822c80b6b 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -2184,13 +2184,16 @@ object Types {
// ------------ Type variables ----------------------------------------
- /** A type variable is essentially a switch that models some part of a substitution.
+ /** In a TypeApply tree, a TypeVar is created for each argument type to be inferred.
+ * Every type variable is referred to by exactly one inferred type parameter of some
+ * TypeApply tree.
+ *
+ * A type variable is essentially a switch that models some part of a substitution.
* It is first linked to `origin`, a poly param that's in the current constraint set.
* It can then be (once) instantiated to some other type. The instantiation is
* recorded in the type variable itself, or else, if the current type state
* is different from the variable's creation state (meaning unrolls are possible)
- * in the current typer state. Every type variable is referred to by exactly
- * one inferred type parameter in a TypeApply tree.
+ * in the current typer state.
*
* @param origin The parameter that's tracked by the type variable.
* @param creatorState The typer state in which the variable was created.