From 1ed37543f0dc893ba697c212c310063541018f5c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 21 Jul 2013 14:42:02 +0200 Subject: Added code for adapt and more. - Pushed mode into context - Elimintaed scope nesting level - Fixed a desugar bug - Added constant folding --- src/dotty/tools/dotc/core/Types.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/dotty/tools/dotc/core/Types.scala') 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 { * .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 -- cgit v1.2.3