Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,6 @@ _generics-bound_ ::= (No type bound)
| `<` _type_ (The generics parameter has an upper bound)
| '>' _type_ (The generics parameter has a lower bound)

# A type parameter can have both upper and lower bounds, which can be specified in either order:
# `[T < UpperBound > LowerBound]` or `[T > LowerBound < UpperBound]`

_default-type_ ::= (No default type)
| `=` _type_ (The generics parameter has default type)

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

A type parameter can have both upper and lower bounds, which can be specified in either order:
`[T < UpperBound > LowerBound]` or `[T > LowerBound < UpperBound]`.

RBS allows class/module/interface/type alias definitions and methods to be generic.

```rbs
Expand Down