Skip to content

Commit 36e53a2

Browse files
authored
Merge pull request #2517 from ruby/lower-bound-doc
Move the note about lower bound
2 parents 2a73da6 + f5279a7 commit 36e53a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/syntax.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -767,9 +767,6 @@ _generics-bound_ ::= (No type bound)
767767
| `<` _type_ (The generics parameter has an upper bound)
768768
| '>' _type_ (The generics parameter has a lower bound)
769769

770-
# A type parameter can have both upper and lower bounds, which can be specified in either order:
771-
# `[T < UpperBound > LowerBound]` or `[T > LowerBound < UpperBound]`
772-
773770
_default-type_ ::= (No default type)
774771
| `=` _type_ (The generics parameter has default type)
775772

@@ -781,6 +778,9 @@ _generics-unchecked_ ::= (Empty)
781778
| `unchecked` (Skips variance annotation validation)
782779
```
783780

781+
A type parameter can have both upper and lower bounds, which can be specified in either order:
782+
`[T < UpperBound > LowerBound]` or `[T > LowerBound < UpperBound]`.
783+
784784
RBS allows class/module/interface/type alias definitions and methods to be generic.
785785

786786
```rbs

0 commit comments

Comments
 (0)