Skip to content

Commit

Permalink
Backport "[spec] some fixes to tuples" to LTS (#20656)
Browse files Browse the repository at this point in the history
Backports #18582 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
  • Loading branch information
WojciechMazur authored Jun 20, 2024
2 parents e4020b9 + 1834d12 commit af88b73
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 af88b73

Please sign in to comment.