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 c9fbc92 commit 8e2c11fCopy full SHA for 8e2c11f
src/dotty/tools/dotc/typer/Checking.scala
@@ -179,6 +179,8 @@ trait Checking {
179
def checkValue(tree: Tree, proto: Type)(implicit ctx: Context): tree.type = {
180
if (!proto.isInstanceOf[SelectionProto]) {
181
val sym = tree.tpe.termSymbol
182
+ // The check is avoided inside Java compilation units because it always fails
183
+ // on the singleton type Module.type.
184
if ((sym is Package) || ((sym is JavaModule) && !ctx.compilationUnit.isJava)) ctx.error(d"$sym is not a value", tree.pos)
185
}
186
tree
0 commit comments