diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-02-17 15:51:38 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-03-11 14:43:06 +0100 |
commit | c1e014c6c7da71987f21ad0db76126261c893f4e (patch) | |
tree | 82632185f55dd43b741b324a28423dc0ab7b27b4 /src/dotty/tools/dotc/ast/tpd.scala | |
parent | 17fd98840927b127cf9aab53d2939176103175c9 (diff) | |
download | dotty-c1e014c6c7da71987f21ad0db76126261c893f4e.tar.gz dotty-c1e014c6c7da71987f21ad0db76126261c893f4e.tar.bz2 dotty-c1e014c6c7da71987f21ad0db76126261c893f4e.zip |
Fix eliding of non-elidable prefix in TypeMap.andThen
Diffstat (limited to 'src/dotty/tools/dotc/ast/tpd.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/tpd.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/tpd.scala b/src/dotty/tools/dotc/ast/tpd.scala index 6a3c1d648..52a617ea2 100644 --- a/src/dotty/tools/dotc/ast/tpd.scala +++ b/src/dotty/tools/dotc/ast/tpd.scala @@ -261,7 +261,10 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { true case pre: ThisType => pre.cls.isStaticOwner || - tp.symbol.is(ParamOrAccessor) && ctx.owner.enclosingClass.derivesFrom(pre.cls) + tp.symbol.is(ParamOrAccessor) && ctx.owner.enclosingClass == pre.cls + // was ctx.owner.enclosingClass.derivesFrom(pre.cls) which was not tight enough + // and was spuriously triggered in case inner class would inherit from outer one + // eg anonymous TypeMap inside TypeMap.andThen case pre: TermRef => pre.symbol.is(Module) && pre.symbol.isStatic case _ => |