aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-04-10 16:42:25 +0200
committerMartin Odersky <odersky@gmail.com>2013-04-10 16:42:25 +0200
commitc1af57447c429f00d09de5b653aae8364e5f6150 (patch)
tree63625206f01841e8026f08af7c3b1ef614e82dcc
parent87ae863c3efa7ce41fed81b783855c572d541898 (diff)
downloaddotty-c1af57447c429f00d09de5b653aae8364e5f6150.tar.gz
dotty-c1af57447c429f00d09de5b653aae8364e5f6150.tar.bz2
dotty-c1af57447c429f00d09de5b653aae8364e5f6150.zip
Consolidation isStatic, isStaticOwner, owner is Package
went thought all occurrences of either and checked that the right one is picked.
-rw-r--r--src/dotty/tools/dotc/core/Substituters.scala2
-rw-r--r--src/dotty/tools/dotc/core/TypeComparers.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Substituters.scala b/src/dotty/tools/dotc/core/Substituters.scala
index c0f0ad5db..d3027026b 100644
--- a/src/dotty/tools/dotc/core/Substituters.scala
+++ b/src/dotty/tools/dotc/core/Substituters.scala
@@ -108,7 +108,7 @@ trait Substituters { this: Context =>
case tp @ ThisType(clazz) =>
if (clazz eq from) to else tp
case tp: NamedType =>
- if (tp.symbol.isStatic) tp
+ if (tp.symbol.isStaticOwner) tp
else tp.derivedNamedType(substThis(tp.prefix, from, to, map))
case _: BoundType | NoPrefix =>
tp
diff --git a/src/dotty/tools/dotc/core/TypeComparers.scala b/src/dotty/tools/dotc/core/TypeComparers.scala
index 9df88eeb8..4f5037c69 100644
--- a/src/dotty/tools/dotc/core/TypeComparers.scala
+++ b/src/dotty/tools/dotc/core/TypeComparers.scala
@@ -66,7 +66,7 @@ object TypeComparers {
val pre2 = tp2.prefix
if (sym1 == sym2) (
ctx.erasedTypes
- || (sym1.owner is Package)
+ || sym1.isStaticOwner
|| isSubType(pre1, pre2))
else (
tp1.name == tp2.name && isSubType(pre1, pre2)