Skip to content

Commit 72c0014

Browse files
committed
Change docs to disallow overloaded toplevels in several source files
1 parent 944facf commit 72c0014

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/reference/dropped-features/package-objects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ in a source file `src.scala`, it could be invoked from the command line using a
4343

4444
**Note 3:** The notion of `private` is independent of whether a definition is wrapped or not. A `private` toplevel definition is always visible from everywhere in the enclosing package.
4545

46-
**Note 4:** If several wrapper objects contain toplevel definitions with the same name,
47-
only the definition that is compiled last is retained. As a consequence, it is impossible to have overloaded toplevel definitions in different files, as the alternatives in the last-compiled file always replace the alternatives compiled earlier.
46+
**Note 4:** If several toplevel definitions are overloaded variants with the same name,
47+
they must all come from the same source file.

0 commit comments

Comments
 (0)