diff options
author | Martin Odersky <odersky@gmail.com> | 2014-12-18 15:39:55 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-12-18 15:43:22 +0100 |
commit | 223fa2bea328fc53f87d6f9d0c28c67545e831af (patch) | |
tree | 0bfffb4a2168df6527779d4d97a87f7309ee333c /src/dotty/tools/dotc/ast/TreeTypeMap.scala | |
parent | e0bf1758ac32d69cf97d28f449cc0400755e3914 (diff) | |
download | dotty-223fa2bea328fc53f87d6f9d0c28c67545e831af.tar.gz dotty-223fa2bea328fc53f87d6f9d0c28c67545e831af.tar.bz2 dotty-223fa2bea328fc53f87d6f9d0c28c67545e831af.zip |
More careful usage of unforced decls in classes.
1) Rename `decls` to `unforcedDecls` to make it clear that
it is danegrous to use.
2) Prefer `info.decls` over `unforcedDecls`.
This fixes the problem reported in #305 where the primary
constructor was not found.
Diffstat (limited to 'src/dotty/tools/dotc/ast/TreeTypeMap.scala')
-rw-r--r-- | src/dotty/tools/dotc/ast/TreeTypeMap.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/TreeTypeMap.scala b/src/dotty/tools/dotc/ast/TreeTypeMap.scala index 846c661f5..98027cd39 100644 --- a/src/dotty/tools/dotc/ast/TreeTypeMap.scala +++ b/src/dotty/tools/dotc/ast/TreeTypeMap.scala @@ -170,7 +170,7 @@ final class TreeTypeMap( val symsChanged = syms ne mapped val substMap = withSubstitution(syms, mapped) val fullMap = (substMap /: mapped.filter(_.isClass)) { (tmap, cls) => - val origDcls = cls.decls.toList + val origDcls = cls.info.decls.toList val mappedDcls = ctx.mapSymbols(origDcls, tmap) val tmap1 = tmap.withMappedSyms(origDcls, mappedDcls) if (symsChanged) (origDcls, mappedDcls).zipped.foreach(cls.asClass.replace) |