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 f685a7d commit a7bd75fCopy full SHA for a7bd75f
src/dotty/tools/dotc/typer/Checking.scala
@@ -27,6 +27,8 @@ trait Checking {
27
def checkValue(tree: Tree, proto: Type)(implicit ctx: Context): tree.type = {
28
if (!proto.isInstanceOf[SelectionProto]) {
29
val sym = tree.tpe.termSymbol
30
+ // The check is avoided inside Java compilation units because it always fails
31
+ // on the singleton type Module.type.
32
if ((sym is Package) || ((sym is JavaModule) && !ctx.compilationUnit.isJava)) ctx.error(d"$sym is not a value", tree.pos)
33
}
34
tree
0 commit comments