@@ -210,12 +210,13 @@ With the established principles and design goals, following rules are imposed:
210
210
211
211
## Modularity (considered)
212
212
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.
215
216
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:
219
220
220
221
``` Scala
221
222
class Base {
@@ -229,11 +230,11 @@ class Child extends Base {
229
230
```
230
231
231
232
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
233
234
` Child ` . This restricts subtle initialization within project boundaries,
234
235
and avoids accidental violation of contracts across library versions.
235
236
236
- We impose the following rules to enforce modularity:
237
+ We can impose the following rules to enforce modularity:
237
238
238
239
4 . A class or trait that may be extended in another project should not
239
240
call _ virtual_ methods on ` this ` in its template/mixin evaluation,
0 commit comments