Skip to content

Commit

Permalink
[spec] some fixes to tuples (#18582)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrd authored Sep 22, 2023
2 parents 920c288 + a2bbef0 commit ee2e7a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/_spec/03-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ SimpleType1 ::= ...
| ‘(’ TypesOrWildcards ‘)’
```

A _tuple type_ ´(T_1, ..., T_n)´ where ´n \geq 2´ is sugar for the type `´T_1´ *: ... *: ´T_n´ *: scala.EmptyTuple`, which is itself a series of nested infix types which are sugar for `*:[´T_1´, *:[´T_2´, ... *[´T_n´, scala.EmptyTuple]]]`.
A _tuple type_ ´(T_1, ..., T_n)´ where ´n \geq 2´ is sugar for the type `´T_1´ *: ... *: ´T_n´ *: scala.EmptyTuple`, which is itself a series of nested infix types which are sugar for `*:[´T_1´, *:[´T_2´, ... *:[´T_n´, scala.EmptyTuple]]]`.
The ´T_i´ can be wildcard type arguments.

Notes:

- `(´T_1´)` is the type ´T_1´, and not `´T_1´ *: scala.EmptyTuple` (´T_1´ cannot be a wildcard type argument in that case).
- `()` is not a valid type (not even `scala.EmptyTuple`).
- `()` is not a valid type (i.e. it is not desugared to `scala.EmptyTuple`).

### Concrete Refined Types

Expand Down

0 comments on commit ee2e7a4

Please sign in to comment.