Skip to content

Commit e124d19

Browse files
committed
Use numbers instead of bullets for implicit scope rules
1 parent c6828a6 commit e124d19

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

docs/docs/reference/changed-features/implicit-resolution.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,29 +59,28 @@ a type:
5959

6060
**Definition:** The _anchors_ of a type _T_ is a set of references defined as follows:
6161

62-
- If _T_ is a reference to an anchor, _T_ itself plus, if _T_ is of the form _P#A_, the anchors of _P_.
63-
- If _T_ is an alias of _U_, the anchors of _U_.
64-
- If _T_ is a reference to a type parameter, the union of the anchors of both of its bounds.
65-
- If _T_ is a singleton reference, the anchors of its underlying type, plus,
62+
1. If _T_ is a reference to an anchor, _T_ itself plus, if _T_ is of the form _P#A_, the anchors of _P_.
63+
1. If _T_ is an alias of _U_, the anchors of _U_.
64+
1. If _T_ is a reference to a type parameter, the union of the anchors of both of its bounds.
65+
1. If _T_ is a singleton reference, the anchors of its underlying type, plus,
6666
if _T_ is of the form _(P#x).type_, the anchors of _P_.
67-
- If _T_ is the this-type _o.this_ of a static object _o_, the anchors of a term reference _o.type_ to that object.
68-
- If _T_ is some other type, the union of the anchors of each constituent type of _T_.
67+
1. If _T_ is the this-type _o.this_ of a static object _o_, the anchors of a term reference _o.type_ to that object.
68+
1. If _T_ is some other type, the union of the anchors of each constituent type of _T_.
6969

7070
**Definition:** The _implicit scope_ of a type _T_ is the smallest set _S_ of term references such that
7171

72-
- If _T_ is a reference to a class, _S_ includes a reference to the companion object
72+
1. If _T_ is a reference to a class, _S_ includes a reference to the companion object
7373
of the class, if it exists, as well as the implicit scopes of all of _T_'s parent classes.
74-
- If _T_ is a reference to an object, _S_ includes _T_ itself as well as
74+
1. If _T_ is a reference to an object, _S_ includes _T_ itself as well as
7575
the implicit scopes of all of _T_'s parent classes.
76-
- If _T_ is a reference to an opaque type alias named _A_, _S_ includes
76+
1. If _T_ is a reference to an opaque type alias named _A_, _S_ includes
7777
a reference to an object _A_ defined in the same scope as the type, if it exists,
7878
as well as the implicit scope of _T_'s underlying type or bounds.
79-
- If _T_ is a reference to an an abstract type or match type alias
80-
named _A_, _S_ includes a reference to an object _A_ defined in the same scope as the type, if it exists, as well as the implicit scopes of _T_'s lower and upper bound, if present.
81-
- If _T_ is a reference to an anchor of the form _p.A_ then _S_ also includes
79+
1. If _T_ is a reference to an an abstract type or match type alias
80+
named _A_, _S_ includes a reference to an object _A_ defined in the same scope as the type, if it exists, as well as the implicit scopes of _T_'s given bounds.
81+
1. If _T_ is a reference to an anchor of the form _p.A_ then _S_ also includes
8282
all term references on the path _p_.
83-
- If _T_ is some other type, _S_ includes the implicit scopes of all anchors of _T_.
84-
83+
1. If _T_ is some other type, _S_ includes the implicit scopes of all anchors of _T_.
8584

8685

8786
**4.** The treatment of ambiguity errors has changed. If an ambiguity is encountered in some recursive step of an implicit search, the ambiguity is propagated to the caller.

0 commit comments

Comments
 (0)