You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/dropped-features/do-while.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,5 @@ do print(".")
36
36
37
37
### Why Drop The Construct?
38
38
39
-
-`do-while` is used relatively rarely and it can expressed faithfully using just `while`. So there seems to be little point in having it as a separate syntax construct.
40
-
- Under the [new syntax rules](../other-new-features/control-syntax.md)`do` is used
41
-
as a statement continuation, which would clash with its meaning as a statement
42
-
introduction.
39
+
-`do-while` is used relatively rarely and it can be expressed faithfully using just `while`. So there seems to be little point in having it as a separate syntax construct.
40
+
- Under the [new syntax rules](../other-new-features/control-syntax.md)`do` is used as a statement continuation, which would clash with its meaning as a statement introduction.
Copy file name to clipboardExpand all lines: docs/docs/reference/dropped-features/package-objects.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,13 +33,14 @@ The compiler generates synthetic objects that wrap top-level definitions falling
33
33
34
34
If a source file `src.scala` contains such top-level definitions, they will be put in a synthetic object named `src$package`. The wrapping is transparent, however. The definitions in `src` can still be accessed as members of the enclosing package.
35
35
36
-
**Note 1:** This means that the name of a source file containing wrapped top-level definitions is relevant for binary compatibility. If the name changes, so does the name of the generated object and its class.
36
+
**Note:** This means that
37
+
1. The name of a source file containing wrapped top-level definitions is relevant for binary compatibility. If the name changes, so does the name of the generated object and its class.
37
38
38
-
**Note 2:** A top-level main method `def main(args: Array[String]): Unit = ...` is wrapped as any other method. If it appears
39
+
2. A top-level main method `def main(args: Array[String]): Unit = ...` is wrapped as any other method. If it appears
39
40
in a source file `src.scala`, it could be invoked from the command line using a command like `scala src$package`. Since the
40
41
"program name" is mangled it is recommended to always put `main` methods in explicitly named objects.
41
42
42
-
**Note 3:** The notion of `private` is independent of whether a definition is wrapped or not. A `private` top-level definition is always visible from everywhere in the enclosing package.
43
+
3. The notion of `private` is independent of whether a definition is wrapped or not. A `private` top-level definition is always visible from everywhere in the enclosing package.
43
44
44
-
**Note 4:** If several top-level definitions are overloaded variants with the same name,
45
+
4. If several top-level definitions are overloaded variants with the same name,
0 commit comments