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.
2 parents d04e704 + 904d9f8 commit 259cf1eCopy full SHA for 259cf1e
src/dotty/tools/dotc/typer/Typer.scala
@@ -1068,7 +1068,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
1068
val packageContext =
1069
if (pkg is Package) ctx.fresh.setOwner(pkg.moduleClass).setTree(tree)
1070
else {
1071
- ctx.error(d"$pkg is not a package", tree.pos)
+ ctx.error(d"$pkg is already defined, cannot be a package", tree.pos)
1072
ctx
1073
}
1074
val stats1 = typedStats(tree.stats, pkg.moduleClass)(packageContext)
0 commit comments