From f5279a72eb3b293b4e8ec70a225b0982debabfea Mon Sep 17 00:00:00 2001 From: Soutaro Matsumoto Date: Tue, 27 May 2025 15:37:22 +0900 Subject: [PATCH] Move the note about lower bound To avoid the header syntax in code section. --- docs/syntax.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/syntax.md b/docs/syntax.md index 19b0eeda9..b53a0b4ed 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -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) @@ -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