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/changed-features/implicit-resolution.md
+13-14Lines changed: 13 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -59,29 +59,28 @@ a type:
59
59
60
60
**Definition:**The _anchors_ of a type_T_ is a set of references defined asfollows:
61
61
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 typeparameter, 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 typeparameter, 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,
66
66
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 typeof _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 typeof _T_.
69
69
70
70
**Definition:**The _implicit scope_ of a type_T_ is the smallest set _S_ of term references such that
71
71
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
73
73
of the class, if it exists, aswellastheimplicit scopes of all of _T_'s parent classes.
74
-
-If _T_ is a reference to an object, _S_ includes _T_ itself aswell as
74
+
1.If _T_ is a reference to an object, _S_ includes _T_ itself aswell as
75
75
the implicit scopes of all of _T_'s parent classes.
76
-
-If _T_ is a reference to an opaquetypealias named _A_, _S_ includes
76
+
1.If _T_ is a reference to an opaquetypealias named _A_, _S_ includes
77
77
a reference to an object_A_ defined in the same scope asthetype, if it exists,
78
78
aswellastheimplicit scope of _T_'s underlying typeor bounds.
79
-
-If _T_ is a reference to an an abstracttypeormatchtypealias
80
-
named _A_, _S_ includes a reference to an object_A_ defined in the same scope asthetype, if it exists, aswellastheimplicit scopes of _T_'slower 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 abstracttypeormatchtypealias
80
+
named _A_, _S_ includes a reference to an object_A_ defined in the same scope asthetype, if it exists, aswellastheimplicit scopes of _T_'sgivenbounds.
81
+
1.If _T_ is a reference to an anchor of the form _p.A_then _S_ also includes
82
82
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_.
85
84
86
85
87
86
**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