Skip to content

Commit bfb395d

Browse files
committed
Refine docs
1 parent 4fc93aa commit bfb395d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

docs/docs/reference/other-new-features/safe-initialization.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,13 @@ With the established principles and design goals, following rules are imposed:
210210

211211
## Modularity (considered)
212212

213-
Note: _the rules proposed in the section are under consideration, but not
214-
implemented. The feedback from the community is welcome._
213+
Currently, the analysis works across project boundaries based on TASTy.
214+
The following is a proposal to make the checking more modular.
215+
The feedback from the community is welcome.
215216

216-
For modularity, we forbid subtle initialization interaction beyond project
217-
boundaries. For example, the following code passes the check when the two
218-
classes are defined in the same project:
217+
For modularity, we need to forbid subtle initialization interaction beyond
218+
project boundaries. For example, the following code passes the check when the
219+
two classes are defined in the same project:
219220

220221
```Scala
221222
class Base {
@@ -229,11 +230,11 @@ class Child extends Base {
229230
```
230231

231232
However, when the class `Base` and `Child` are defined in two different
232-
projects, the check will emit a warning for the calls to `enter` in the class
233+
projects, the check can emit a warning for the calls to `enter` in the class
233234
`Child`. This restricts subtle initialization within project boundaries,
234235
and avoids accidental violation of contracts across library versions.
235236

236-
We impose the following rules to enforce modularity:
237+
We can impose the following rules to enforce modularity:
237238

238239
4. A class or trait that may be extended in another project should not
239240
call _virtual_ methods on `this` in its template/mixin evaluation,

0 commit comments

Comments
 (0)