aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-10-09 12:36:43 +0200
committerMartin Odersky <odersky@gmail.com>2013-10-09 12:36:43 +0200
commit0fc19e0e1ef7b56f9ca0649fde35765892cf1a53 (patch)
treed037ee483a3c89218acf35983006dd8bc4336b46 /src/dotty/tools/dotc/typer/Namer.scala
parent16c1ddd3bb86c61890418b8394d44486e7bbd9dd (diff)
downloaddotty-0fc19e0e1ef7b56f9ca0649fde35765892cf1a53.tar.gz
dotty-0fc19e0e1ef7b56f9ca0649fde35765892cf1a53.tar.bz2
dotty-0fc19e0e1ef7b56f9ca0649fde35765892cf1a53.zip
Cleanup of new scheme for handling local type parameters and type members.
If a type parameter or local type member is co/contravariant, its instantiation is a special alias type that remembers the variance. These alias types can be refined with subtypes in subclasses and intersection and union translate to their bounds.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index e9eb7df0b..72ed20454 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -431,7 +431,7 @@ class Namer { typer: Typer =>
else rhsType
case _ =>
if (tparamSyms.nonEmpty) rhsType.LambdaAbstract(tparamSyms)(ctx.error(_, _))
- else TypeBounds(rhsType, rhsType)
+ else TypeAlias(rhsType, sym.localVariance)
}
}
} \ No newline at end of file