Class CopyConstructor
Step(Step). Call this, do not re-derive it.
🔑 Exact type, never a promotion or a super. A constructor taking a wider type (Step(Any),
a trait, the super) or one reached through #^ does not make an independent value of the SAME type, so
it is not a copy constructor. The match is drawn on isExactSameType - symbol identity, never a name.
A generic's conceptual T always has one (CommonFactory gives every type parameter a constructor
per type parameter, so T(item as T)); a range over T marks it ACCESSED_BY_RANGE, so the type a generic is
parameterised with - constrained T included - must have its own, by THIS predicate (phase 4, E08272; Steve R1/R3,
2026-10-07).
Users: the constrained-type copy mechanism (phase2/PopulateConstrainedTypeOrError, Path A), the
for-range rule (phase3/ForRangeOrError, E08272), its parameterisation check
(phase4/ParameterisedTypeOrError) and the for-range IR (phase7/generator/
RangeIterationHelper: counter = T(start), loop variable = T(counter); Contract 15). Extracted
2026-10-07 from PopulateConstrainedTypeOrError.takesExactlyTheBase when the range copy became a
copy-constructor call (Steve, RANGE COPY decision).
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<MethodSymbol> of(IAggregateSymbol type) The public copy constructor oftype, if it has one.static booleantakesExactlyOne(MethodSymbol method, ISymbol type) True whenmethodtakes exactly one parameter whose type is exactlytype.
-
Method Details
-
of
The public copy constructor oftype, if it has one. -
takesExactlyOne
True whenmethodtakes exactly one parameter whose type is exactlytype. Used for a copy OPERATOR too (:=:taking exactly the base).
-