48. Dream-port core syntax batch (2026-11-21)
--- multitest ---/--- with multitest() ---wrap-lines are provisional (program shape is a deferred design question). They lower to the sameDecorator { directive: true }AST node as@!multitestso dream files parse and check today, while@!multitestremains the canonical spelling for corpus ports — do not codemod ports onto wrap-lines until program shape settles. Reverse: removewrap_linefromcpl-syntax/src/parser/stmt.rsandis_directive_linefromitems.rs.- Typed tuple patterns
let (a: T, b: U) = ...desugar tolet (a, b): (T, U) = .... Reason: zero AST/IR/codegen duplication; works identically withread()and any tuple expression. Reverse: removehas_typed_tuple_patternincpl-syntax/src/parser/stmt.rs. - Fieldless enum-indexed arrays
[Sign]Tlower toDimSpec::Int(k)and tag-checked indexing. Reason: matches[Bool]Twithout new IR ops, interpreter changes, or C++ runtime types; evaluates the index expression once via a temp. Reverse: remove theSym::Enumarm incpl-ir/src/lower/mod.rs(dim) andexpr.rs(index_expr). - Canonical generic call spelling is
f<T>(...)without::;f::<T>(...)is warned byL0204(turbofish_type_args) with acpl fix/cpl lint --fixcodemod. Reason: eliminates two spellings for one idea (read::<T>()vsread<T>(),topo::<V>(...)vstopo<V>(...)) while preserving backwards compatibility during migration. Reverse: removeTURBOFISH_TYPE_ARGSfromcpl-lintand"fix"fromcpl-cli. - Typed lambda parameter annotations
(x: T) => bodyare retained inExprKind::Lambda.param_tysand typechecked in bothcpl-checkandcpl-ir, withTy::fits_incheckingTy::Fnparameter/return compatibility. Reason: parsed-but-ignored type annotations are a silent-wrongness trap. Reverse: revertparam_tyschecks. x is pat(optionally chained withand cond) desugars toif let pat = x: cond else: false(andCond::Letinif/whileheaders), and comparison operators (<,>,<=,>=,==,!=) are accepted as operator-section arguments (by: <). Reason: reuses existingCond::Letnarrowing and lambda lowering with zero new IR ops. Reverse: removeat_is_patternand comparison arms incpl-syntax/src/parser/expr.rs.- Fieldless enums accept explicit integer discriminants (
enum Sign: Neg = -1, Zero = 0, Pos = 1) withInt(e)andEnum(i)conversions lowered viaIsVariant/equality chains. Reason: supports signed/custom discriminants without changing enum tag representation (0..n). Reverse: removeVariant.valueandenum_discriminants. - Named mutable aliases (
let st = mut a[i]) bind to a frozenPlacewhose index subexpressions are evaluated once into temp locals. Reason: preserves value semantics for ordinaryletwhile giving zero-copy mutable element aliases (st.lift += 1) that agree across interpreter and C++17 codegen. Reverse: removeExprKind::MutandFnCx.mut_aliases.