aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Flags.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-08-17 15:03:01 +0200
committerMartin Odersky <odersky@gmail.com>2013-08-17 15:03:01 +0200
commit8b2e95eaf06096b1fb4b50fc273809c687f39373 (patch)
tree43365d18406cff390e7c2dd8d65ce5e0a3387c3b /src/dotty/tools/dotc/core/Flags.scala
parentfd6a6774be4be37f707f509aef997e456a6b64ac (diff)
downloaddotty-8b2e95eaf06096b1fb4b50fc273809c687f39373.tar.gz
dotty-8b2e95eaf06096b1fb4b50fc273809c687f39373.tar.bz2
dotty-8b2e95eaf06096b1fb4b50fc273809c687f39373.zip
Making definitions permanent
Need to ensure that specially generated symbols in definitions are valid forever; otherwise they would disappear after first run.
Diffstat (limited to 'src/dotty/tools/dotc/core/Flags.scala')
-rw-r--r--src/dotty/tools/dotc/core/Flags.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala
index 3a54340d8..229d71568 100644
--- a/src/dotty/tools/dotc/core/Flags.scala
+++ b/src/dotty/tools/dotc/core/Flags.scala
@@ -370,6 +370,9 @@ object Flags {
/** A method that is known to no default parameters */
final val NoDefaultParams = termFlag(60, "<no-default-param>")
+ /** A denotation that is valid in all run-ids */
+ final val Permanent = commonFlag(61, "<permanent>")
+
// --------- Combined Flag Sets and Conjunctions ----------------------
/** Flags representing source modifiers */
@@ -384,7 +387,7 @@ object Flags {
final val FromStartFlags =
AccessFlags | Module | Package | Deferred | Param | Scala2ExistentialCommon | Touched |
Static | CovariantCommon | ContravariantCommon | ExpandedName | AccessorOrSealed | Frozen |
- Erroneous | ImplicitCommon
+ Erroneous | ImplicitCommon | Permanent
assert(FromStartFlags.isTermFlags && FromStartFlags.isTypeFlags)
// TODO: Should check that FromStartFlags do not change in completion
@@ -450,6 +453,9 @@ object Flags {
/** Has defined or inherited default parameters */
final val HasDefaultParams = DefaultParameterized | InheritedDefaultParams
+ /** Is valid forever */
+ final val ValidForever = Package | Permanent
+
/** Is a default parameter in Scala 2*/
final val DefaultParameter = allOf(Param, DefaultParameterized)