aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-01-28 16:24:06 +1100
committerMartin Odersky <odersky@gmail.com>2017-01-28 16:24:06 +1100
commit2bbf9ca068dd550ac68a83f33f7fc94505e6cfcc (patch)
tree7b9e6b0778ea4bac4b4c1f9165f4582ec986fcaf /compiler/src/dotty/tools/dotc/ast/TreeInfo.scala
parent8464c16181474b625a3269e2c5b1f80a4a88482c (diff)
downloaddotty-2bbf9ca068dd550ac68a83f33f7fc94505e6cfcc.tar.gz
dotty-2bbf9ca068dd550ac68a83f33f7fc94505e6cfcc.tar.bz2
dotty-2bbf9ca068dd550ac68a83f33f7fc94505e6cfcc.zip
Generalize test whether access is to a refinement
A previous type comparison was wrong because it did not map refined-this types. I believe it was also redundant, so the easiest fix is to drop it.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/ast/TreeInfo.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/ast/TreeInfo.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala
index 429b7235b..bcda4b92f 100644
--- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala
+++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala
@@ -637,7 +637,7 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
case tree: Select =>
def hasRefinement(qualtpe: Type): Boolean = qualtpe.dealias match {
case RefinedType(parent, rname, rinfo) =>
- rname == tree.name && tree.tpe.widen <:< rinfo || hasRefinement(parent)
+ rname == tree.name || hasRefinement(parent)
case tp: TypeProxy =>
hasRefinement(tp.underlying)
case tp: OrType =>