aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Flags.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-09-13 16:37:06 +0200
committerMartin Odersky <odersky@gmail.com>2014-09-13 17:59:06 +0200
commit5634dcc1490de05dbf5b3f2637a7e0eb4be8d6d0 (patch)
tree3ba58f946ecb4efcef86a25cfdc52bc7b0cffab6 /src/dotty/tools/dotc/core/Flags.scala
parent2317764b683fe548f7c5e3b5ee5ede9760433c61 (diff)
downloaddotty-5634dcc1490de05dbf5b3f2637a7e0eb4be8d6d0.tar.gz
dotty-5634dcc1490de05dbf5b3f2637a7e0eb4be8d6d0.tar.bz2
dotty-5634dcc1490de05dbf5b3f2637a7e0eb4be8d6d0.zip
Better TreeTypeMaps
1. They now keep track of changed constructors in templates, updating the class scope as for other members. 2. Any changed members are now entered into the new class scope at exactly the same position as the old one. That ensures that things like caseAccessors still work. 3. ChangeOwners now is reflected in the prefixes of any named types. 4. Newly created classes now get their own ClassInfo type. 5. TreeTypeMaps always crete "fresh" symbols. Fresh symbols do not share a NamedType reference with an existing reference to some other symbol. This obviates b2e0e7b4, which will be reverted. To make it work, the interface of TreeMap changed from an ownerMap function to a substitution-like data structure working with two lists.
Diffstat (limited to 'src/dotty/tools/dotc/core/Flags.scala')
-rw-r--r--src/dotty/tools/dotc/core/Flags.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala
index f89a5ce46..896de25fd 100644
--- a/src/dotty/tools/dotc/core/Flags.scala
+++ b/src/dotty/tools/dotc/core/Flags.scala
@@ -356,6 +356,9 @@ object Flags {
// Flags following this one are not pickled
+ /** Symbol always defines a fresh named type */
+ final val Fresh = commonFlag(45, "<fresh>")
+
/** Symbol is defined in a super call */
final val InSuperCall = commonFlag(46, "<in supercall>")
@@ -434,7 +437,8 @@ object Flags {
final val FromStartFlags =
AccessFlags | Module | Package | Deferred | MethodOrHKCommon | Param | ParamAccessor | Scala2ExistentialCommon |
InSuperCall | Touched | Static | CovariantOrOuter | ContravariantOrLabel | ExpandedName | AccessorOrSealed |
- CaseAccessorOrTypeArgument | Frozen | Erroneous | ImplicitCommon | Permanent | SelfNameOrImplClass
+ CaseAccessorOrTypeArgument | Fresh | Frozen | Erroneous | ImplicitCommon | Permanent |
+ SelfNameOrImplClass
assert(FromStartFlags.isTermFlags && FromStartFlags.isTypeFlags)
// TODO: Should check that FromStartFlags do not change in completion