aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/Flags.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-03-08 16:51:06 +0100
committerMartin Odersky <odersky@gmail.com>2017-03-08 16:52:43 +0100
commit22e9219dd46eeb3b4ba3823d6dc45bc42c41dca1 (patch)
tree7a6f87b1e615c218258666004cca2766895640a4 /compiler/src/dotty/tools/dotc/core/Flags.scala
parentc84480960cf618c29705dbaab9332d304a081524 (diff)
downloaddotty-22e9219dd46eeb3b4ba3823d6dc45bc42c41dca1.tar.gz
dotty-22e9219dd46eeb3b4ba3823d6dc45bc42c41dca1.tar.bz2
dotty-22e9219dd46eeb3b4ba3823d6dc45bc42c41dca1.zip
Fix #2067: Compute defKind at Typer, not Namer
It's hard to predict for defKind all the desugarings that can be applied to a definition. Better to do it once the desugarings have been applied. NoInit and PureInterface are both tested only after Typer, so it's OK to delay their initialization until regular Typer.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Flags.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Flags.scala9
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Flags.scala b/compiler/src/dotty/tools/dotc/core/Flags.scala
index d2a1c58f5..c1267d8a2 100644
--- a/compiler/src/dotty/tools/dotc/core/Flags.scala
+++ b/compiler/src/dotty/tools/dotc/core/Flags.scala
@@ -287,9 +287,10 @@ object Flags {
/** A trait that has only abstract methods as members
- * (and therefore can be represented by a Java interface
+ * and therefore can be represented by a Java interface.
+ * Warning: flag is set during regular typer pass, should be tested only after typer.
*/
- final val PureInterface = typeFlag(22, "interface") // TODO when unpickling, reconstitute from context
+ final val PureInterface = typeFlag(22, "interface")
/** Labeled with of abstract & override */
final val AbsOverride = termFlag(22, "abstract override")
@@ -338,7 +339,9 @@ object Flags {
final val JavaStaticTerm = JavaStatic.toTermFlags
final val JavaStaticType = JavaStatic.toTypeFlags
- /** Trait does not have fields or initialization code */
+ /** Trait does not have fields or initialization code.
+ * Warning: flag is set during regular typer pass, should be tested only after typer.
+ */
final val NoInits = typeFlag(32, "<noInits>")
/** Variable is accessed from nested function. */