diff options
author | odersky <odersky@gmail.com> | 2016-11-17 11:22:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-17 11:22:08 +0100 |
commit | 6f04ca7f497212df4172bdb119d523388c42d5fd (patch) | |
tree | 0d23a0ad4a529d52e35f1fc145434aa006bb5505 /src/dotty/tools | |
parent | a0169b7eda8bf68b17c59701838017099f31d239 (diff) | |
parent | f68058c02db32f33ccbd53a9e1ca346701a72abb (diff) | |
download | dotty-6f04ca7f497212df4172bdb119d523388c42d5fd.tar.gz dotty-6f04ca7f497212df4172bdb119d523388c42d5fd.tar.bz2 dotty-6f04ca7f497212df4172bdb119d523388c42d5fd.zip |
Merge pull request #1711 from dotty-staging/fix-isNullable
Fix isNullable when `<:<` term refs.
Diffstat (limited to 'src/dotty/tools')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeComparer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala index 1980fe50d..0e1d373a8 100644 --- a/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/src/dotty/tools/dotc/core/TypeComparer.scala @@ -527,7 +527,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling { } isSubType(hi1, tp2) || compareGADT case _ => - def isNullable(tp: Type): Boolean = tp.dealias match { + def isNullable(tp: Type): Boolean = tp.widenDealias match { case tp: TypeRef => tp.symbol.isNullableClass case tp: RefinedOrRecType => isNullable(tp.parent) case AndType(tp1, tp2) => isNullable(tp1) && isNullable(tp2) |