@@ -13,14 +13,14 @@ To get a feel of how it works, we first show several examples below.
1313
1414Given the following code snippet:
1515
16- ``` Scala
16+ ``` scala
1717abstract class AbstractFile {
1818 def name : String
1919 val extension : String = name.substring(4 )
2020}
2121
2222class RemoteFile (url : String ) extends AbstractFile {
23- val localFile : String = url.hashCode + " .tmp" // error: usge of `localFile` before it's initialized
23+ val localFile : String = s " ${ url.## } .tmp " // error: usage of `localFile` before it's initialized
2424 def name : String = localFile
2525}
2626```
@@ -227,14 +227,14 @@ and avoids accidental violation of contracts across library versions.
227227
228228We impose the following rules to enforce modularity:
229229
230- 4 . A class or trait that may be extended in another project should not
230+ 1 . A class or trait that may be extended in another project should not
231231 call virtual methods on ` this ` in its template/mixin evaluation,
232232 directly or indirectly.
233233
234- 5 . The method call ` o.m(args) ` is forbidden if ` o ` is not transitively
234+ 2 . The method call ` o.m(args) ` is forbidden if ` o ` is not transitively
235235 initialized and the target of ` m ` is defined in an external project.
236236
237- 6 . The expression ` new p.C(args) ` is forbidden, if ` p ` is not transitively
237+ 3 . The expression ` new p.C(args) ` is forbidden, if ` p ` is not transitively
238238 initialized and ` C ` is defined in an external project.
239239
240240Theoretically, we may analyze across project boundaries based on tasty. However,
@@ -262,7 +262,7 @@ Potentials (π) represent values that are possibly under initialization.
262262- ` π.super[D] ` : essentially the object π, used for virtual method resolution
263263- ` Cold ` : an object with unknown initialization status
264264- ` Fun(Π, Φ) ` : a function, when called produce effects Φ and return potentials Π.
265- - ` Outer(C, π) ` : the potential of ` this ` for the enclosing class of ` C ` when ` C.this ` is ` π` .
265+ - ` Outer(C, π) ` : the potential of ` this ` for the enclosing class of ` C ` when ` C.this ` is ` π ` .
266266
267267Effects are triggered from potentials:
268268
0 commit comments