diff options
author | odersky <odersky@gmail.com> | 2017-04-11 09:29:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-11 09:29:25 +0200 |
commit | 4ff656138a2e4e127b763adeee3f0f72d515f6b6 (patch) | |
tree | cd65d0f412217ccf5fb9cb082514fb6a0444e94b /compiler/src/dotty/tools/dotc/core | |
parent | 0bd782195b7bcaa2d270b6306fd02c8a649822e9 (diff) | |
parent | 0cf17c5f63b3ec37a05da920a81337067ac335db (diff) | |
download | dotty-4ff656138a2e4e127b763adeee3f0f72d515f6b6.tar.gz dotty-4ff656138a2e4e127b763adeee3f0f72d515f6b6.tar.bz2 dotty-4ff656138a2e4e127b763adeee3f0f72d515f6b6.zip |
Merge pull request #2215 from dotty-staging/#2142
Fix #2142: Skolemize arguments of dependent methods if necessary
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Types.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index e7130ee2f..4c69c9484 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -107,10 +107,11 @@ object Types { final def isValueTypeOrLambda: Boolean = isValueType || this.isInstanceOf[TypeLambda] /** Does this type denote a stable reference (i.e. singleton type)? */ - @tailrec final def isStable(implicit ctx: Context): Boolean = stripTypeVar match { - case tp: TermRef => tp.termSymbol.isStable && tp.prefix.isStable + final def isStable(implicit ctx: Context): Boolean = stripTypeVar match { + case tp: TermRef => tp.termSymbol.isStable && tp.prefix.isStable || tp.info.isStable case _: SingletonType | NoPrefix => true case tp: RefinedOrRecType => tp.parent.isStable + case tp: ExprType => tp.resultType.isStable case _ => false } |