We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 318c685 commit 789dc0cCopy full SHA for 789dc0c
src/dotty/tools/dotc/transform/ValueClasses.scala
@@ -13,10 +13,15 @@ import StdNames._
13
object ValueClasses {
14
15
def isDerivedValueClass(d: SymDenotation)(implicit ctx: Context) =
16
- d.isClass &&
17
- d.derivesFrom(defn.AnyValClass) &&
18
- (d.symbol ne defn.AnyValClass) &&
19
- !d.isPrimitiveValueClass
+ d.initial match {
+ case di: ClassDenotation =>
+ d.isClass &&
+ di.derivesFrom(defn.AnyValClass)(ctx.withPhase(di.validFor.firstPhaseId)) &&
20
+ (d.symbol ne defn.AnyValClass) &&
21
+ !d.isPrimitiveValueClass
22
+ case _ =>
23
+ false
24
+ }
25
26
def isMethodWithExtension(d: SymDenotation)(implicit ctx: Context) =
27
d.isSourceMethod &&
0 commit comments