diff options
author | Martin Odersky <odersky@gmail.com> | 2016-10-01 21:35:58 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-10-11 19:21:02 +0200 |
commit | 98a69d90b16f0cc997255f097d3d5d9f2a60301b (patch) | |
tree | c3640fb82f53f4f6e250de59d3536f638b63f1aa /src/dotty/tools/dotc/typer/Namer.scala | |
parent | f6291e42082708e164ebc3456d84e69f4f29cf59 (diff) | |
download | dotty-98a69d90b16f0cc997255f097d3d5d9f2a60301b.tar.gz dotty-98a69d90b16f0cc997255f097d3d5d9f2a60301b.tar.bz2 dotty-98a69d90b16f0cc997255f097d3d5d9f2a60301b.zip |
Keep or types
Don't replace them by their dominators, unless one of the following holds:
- language:Scala2 mode is on
- we are at the point of findMember selection
- we compare with a higher-kinded application
This means approximateUnion is now split into harmonizeUnion and
orDominator which each implement one of the former's two functionalities.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Namer.scala | 2 |
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 4f4278468..00e92cbfb 100644 --- a/src/dotty/tools/dotc/typer/Namer.scala +++ b/src/dotty/tools/dotc/typer/Namer.scala @@ -898,7 +898,7 @@ class Namer { typer: Typer => // definition is inline (i.e. final in Scala2). def widenRhs(tp: Type): Type = tp.widenTermRefExpr match { case tp: ConstantType if isInline => tp - case _ => tp.widen.approximateUnion + case _ => ctx.harmonizeUnion(tp.widen) } // Replace aliases to Unit by Unit itself. If we leave the alias in |