aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Symbols.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-03-22 11:31:50 +0100
committerMartin Odersky <odersky@gmail.com>2015-03-22 11:31:50 +0100
commitf71a6da42c6816916fd2c1eee3e8b6075018ce16 (patch)
treeb160a7c4ffc4999a55a280f93e408bd973f78e00 /src/dotty/tools/dotc/core/Symbols.scala
parentbee42c9df96ef3664a27796b6eecdfbc910bd108 (diff)
downloaddotty-f71a6da42c6816916fd2c1eee3e8b6075018ce16.tar.gz
dotty-f71a6da42c6816916fd2c1eee3e8b6075018ce16.tar.bz2
dotty-f71a6da42c6816916fd2c1eee3e8b6075018ce16.zip
Have derivedValueClass run at initial stage
Fixes #412, by calling derivesFrom in isDerivedValueClass at initial phase. Rewrite of 789dc0c070bde6ce8634aa89e73e31ec1233a6f8 by @smarter. Does the same thing in Symbol#isDerivedValueClass.
Diffstat (limited to 'src/dotty/tools/dotc/core/Symbols.scala')
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index f6e4119ea..a27ce3d6a 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -418,9 +418,12 @@ object Symbols {
def filter(p: Symbol => Boolean): Symbol = if (p(this)) this else NoSymbol
/** Is this symbol a user-defined value class? */
- final def isDerivedValueClass(implicit ctx: Context): Boolean =
+ final def isDerivedValueClass(implicit ctx: Context): Boolean = {
+ this.derivesFrom(defn.AnyValClass)(ctx.withPhase(denot.validFor.firstPhaseId))
+ // Simulate ValueClasses.isDerivedValueClass
false // will migrate to ValueClasses.isDerivedValueClass;
// unsupported value class code will continue to use this stub while it exists
+ }
/** The current name of this symbol */
final def name(implicit ctx: Context): ThisName = denot.name.asInstanceOf[ThisName]