From aaa2305fb7b4c637724c56f79d417c4ad766d0f5 Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Wed, 27 May 2026 18:23:37 +0000 Subject: [PATCH] Expand Section 2.5 entry in the PER-CS 2.0 to 3.0 migration guide Section 2.5 existed in 2.0 but covered only keyword and type casing. The entire compound-type subsection is new in 3.0. The migration guide's existing Section 2.5 entry compressed the spec's multi-line splitting rules into a single bullet that did not mention the symbol at start of line requirement and was inaccurate for pure intersections. This commit rewrites the splitting guidance into three bullets that match the spec, in the same order. --- migration-3.0.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migration-3.0.md b/migration-3.0.md index 409a868..e452c60 100644 --- a/migration-3.0.md +++ b/migration-3.0.md @@ -24,7 +24,10 @@ is the canonical source for the PER-CS formatting expectations. Formatting conventions are now provided for compound types (those that include union or intersection type declarations). * The `|` and `&` symbols and parentheses MUST NOT have leading or trailing spaces. -* If a type declaration is long enough to split to multiple lines, each ANDed block must be on one line, and each ORed block on its own line. +* If a type declaration is long enough to split to multiple lines: + * If the type is only unions or only intersections, each line holds a single type. + * If it mixes both, each line holds one union segment, with that segment's intersected types kept together. + * The symbol on which it is split MUST be at the start of each line. * If one of the types listed is `null`, it must come last. * Favor `?` over `|null` in cases where both work. * A multi-catch statement must follow the same rules. (See section 5.6 as well.)