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 3ae3b08 commit daaedb8Copy full SHA for daaedb8
compiler/src/dotty/tools/dotc/typer/Checking.scala
@@ -464,6 +464,8 @@ object Checking {
464
case List(param) =>
465
if (param.is(Mutable))
466
ctx.error("value class parameter must not be a var", param.pos)
467
+ if (param.info.isPhantom)
468
+ ctx.error("value class parameter must not be phantom", param.pos)
469
case _ =>
470
ctx.error("value class needs to have exactly one val parameter", clazz.pos)
471
}
0 commit comments