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/contextual/relationship-implicits.md
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -61,15 +61,23 @@ The synthesized type names are formed from
61
61
Tuples are treated as transparent, i.e. a type `F[(X, Y)]` would get the synthesized name
62
62
`F_X_Y`. Directly implemented function types `A => B` are represented as `A_to_B`. Function types used as arguments to other type constructors are represented as `Function`.
63
63
64
-
Anonymous given instances that define extension methods
65
-
get their name from the name of the first extension method and the toplevel type
66
-
constructor of its first parameter. For example, the given instance
64
+
### Anonymous Collective Extensions
65
+
66
+
Anonymous collective extensions also get compiler synthesized names, which are formed from
67
+
68
+
- the prefix `extension_`
69
+
- the name of the first defined extension method
70
+
- the simple name of the first parameter type of this extension method
71
+
- the simple name(s) of the toplevel argument type constructors to this type.
72
+
73
+
For example, the extension
67
74
```scala
68
75
extension of [T] (xs: List[T]) with {
69
76
defsecond= ...
70
77
}
71
78
```
72
-
gets the synthesized name `given_second_of_List_T`.
79
+
gets the synthesized name `extension_second_List_T`.
0 commit comments