File tree 1 file changed +5
-4
lines changed
docs/docs/reference/new-types
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ title: "Intersection Types - More Details"
5
5
6
6
## Syntax
7
7
8
- Syntactically, an intersection type ` S & T ` is similar to an infix type, where
9
- the infix operator is ` & ` . ` & ` is treated as a soft keyword. That is, it is a
10
- normal identifier with the usual precedence. But a type of the form ` A & B ` is
11
- always recognized as an intersection type, without trying to resolve ` & ` .
8
+ Syntactically, the type ` S & T ` is an infix type, where the infix operator is ` & ` .
9
+ The operator ` & ` is a normal identifier
10
+ with the usual precedence and subject to usual resolving rules.
11
+ Unless shadowed by another definition, it resolves to the type ` scala.& ` ,
12
+ which acts as a type alias to an internal representation of intersection types.
12
13
13
14
```
14
15
Type ::= ...| InfixType
You can’t perform that action at this time.
0 commit comments