diff options
author | Martin Odersky <odersky@gmail.com> | 2013-07-21 14:42:02 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-07-21 14:42:02 +0200 |
commit | 1ed37543f0dc893ba697c212c310063541018f5c (patch) | |
tree | c0e76ae1e556ad40bb3e6c3ff6aef90b2ce342ef /src/dotty/tools/dotc/core/Types.scala | |
parent | 7e1bd23bf01c6949e08785eb5afc0fcf46b72afb (diff) | |
download | dotty-1ed37543f0dc893ba697c212c310063541018f5c.tar.gz dotty-1ed37543f0dc893ba697c212c310063541018f5c.tar.bz2 dotty-1ed37543f0dc893ba697c212c310063541018f5c.zip |
Added code for adapt and more.
- Pushed mode into context
- Elimintaed scope nesting level
- Fixed a desugar bug
- Added constant folding
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index f2b86242d..ef06c37f7 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -510,6 +510,8 @@ object Types { * <o.x.type>.widen = o.C */ final def widen(implicit ctx: Context): Type = this match { + case tp: TermRef => + if (tp.denot.isOverloaded) tp else tp.underlying.widen case tp: SingletonType => tp.underlying.widen case tp: TypeBounds => tp.hi.widen // needed? case tp: ExprType => tp.resultType.widen |