Class CopyConstructor
- All Implemented Interfaces:
Function<IAggregateSymbol, Optional<MethodSymbol>>
Step(Step). Hold one and ask it, 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 alias/constrained-type copy (phase2/PopulateConstrainedTypeOrError, E06131 - the ONLY
copy since decision D10), 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).
-
Constructor Details
-
CopyConstructor
public CopyConstructor()
-
-
Method Details
-
apply
The public copy constructor oftype, if it has one.- Specified by:
applyin interfaceFunction<IAggregateSymbol, Optional<MethodSymbol>>
-