Skip to content

Commit 25433d1

Browse files
committed
Update doc page
1 parent 74aabd6 commit 25433d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ in a source file `src.scala`, it could be invoked from the command line using a
4242
"program name" is mangled it is recommended to always put `main` methods in explicitly named objects.
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.
45+
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.

0 commit comments

Comments
 (0)