aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Definitions.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-03-18 12:05:52 +0100
committerMartin Odersky <odersky@gmail.com>2013-03-18 12:05:52 +0100
commit830e511b6b620716d3f550a199d0a5c52c95423a (patch)
tree01de8964bc3a97cb2ff5fe4d11c635ec7e709f36 /src/dotty/tools/dotc/core/Definitions.scala
parent52d740d120cd197ee816aa0a06732ccdb5d5ab29 (diff)
downloaddotty-830e511b6b620716d3f550a199d0a5c52c95423a.tar.gz
dotty-830e511b6b620716d3f550a199d0a5c52c95423a.tar.bz2
dotty-830e511b6b620716d3f550a199d0a5c52c95423a.zip
Cleanup of higher-kinded types treatment
Diffstat (limited to 'src/dotty/tools/dotc/core/Definitions.scala')
-rw-r--r--src/dotty/tools/dotc/core/Definitions.scala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala
index 471510e6f..c728493dd 100644
--- a/src/dotty/tools/dotc/core/Definitions.scala
+++ b/src/dotty/tools/dotc/core/Definitions.scala
@@ -211,15 +211,16 @@ class Definitions(implicit ctx: Context) {
def hkParamNames = _hkParamNames
def hkParamArity = _hkParamArity
+ /** A trait `HigherKinded[Lo_1,...,Lo_n,Hi_1,...,Hi_n]` that represents
+ * the bounds of a higher-kinded type.
+ */
def hkTrait(n: Int): ClassSymbol = {
val completer = new LazyType {
def complete(denot: SymDenotation): Unit = {
val cls = denot.asClass.classSymbol
val paramDecls = newScope
- for (i <- 0 until n) {
- newSyntheticTypeParam(cls, paramDecls, "Lo"+i)
- newSyntheticTypeParam(cls, paramDecls, "Hi"+i)
- }
+ for (i <- 0 until n) newSyntheticTypeParam(cls, paramDecls, "Lo"+i)
+ for (i <- 0 until n) newSyntheticTypeParam(cls, paramDecls, "Hi"+i)
denot.info = ClassInfo(ScalaPackageClass.thisType, cls, List(ObjectClass.typeConstructor), paramDecls)
}
}