diff options
author | Martin Odersky <odersky@gmail.com> | 2013-11-03 12:45:49 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-11-03 12:50:01 +0100 |
commit | 6728b51613c6a3ee858ace014fb9c9097d15c35b (patch) | |
tree | 34799964daf5fa15e3917483991a4220e6ad50d3 /src/dotty/tools/dotc/typer/Typer.scala | |
parent | f920a3186427e9df2fbac97197f2f11331ef4ef3 (diff) | |
download | dotty-6728b51613c6a3ee858ace014fb9c9097d15c35b.tar.gz dotty-6728b51613c6a3ee858ace014fb9c9097d15c35b.tar.bz2 dotty-6728b51613c6a3ee858ace014fb9c9097d15c35b.zip |
Adding simplification and fixing a variance problem.
1. Added a "simplified" method which gets called on type varianvle instantiation and interpolation.
2. Fixed a problem in TypeAccumulator which did not take the variance into account for Co/Contra type aliases.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index d607d547b..eec005bc5 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -929,6 +929,7 @@ class Typer extends Namer with Applications with Implicits { def interpolateAndAdapt(tree: Tree, pt: Type)(implicit ctx: Context) = { ctx.interpolateUndetVars(tree.tpe.widen, tree.pos) + tree overwriteType tree.tpe.simplified adapt(tree, pt) } |