Class ConstrainedConstructionResolver
java.lang.Object
org.ek9lang.compiler.phase5.ConstrainedConstructionResolver
- All Implemented Interfaces:
Function<EK9Parser.CallContext, ConstrainedConstructionResolver.Site>
final class ConstrainedConstructionResolver
extends Object
implements Function<EK9Parser.CallContext, ConstrainedConstructionResolver.Site>
THE shared resolver for a constrained-type construction site — a constructor call whose constructed
type is a
CLASS_CONSTRAINED aggregate carrying a constraint, together with its single
base-type argument symbol. Reused by both ConstrainedConstructionOrError (which errors when
the value arriving at the constructor provably violates the constraint, E08260) and
ObligationCensus (which counts the construction as a CONSTRAINED_CONSTRUCTION
obligation, discharged only when the argument is a literal proven inside the interval). Extracted so
the two never drift on what "a constrained construction" is.
Returns a ConstrainedConstructionResolver.Site whenever the call is a constrained constructor with a single resolved
argument symbol — regardless of whether the argument is a literal; the literal/computed
distinction (and the compile-time evaluation) is each consumer's own concern; otherwise null. Hold one;
was a static resolve (no-statics lane P2, 2026-10-29).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
ConstrainedConstructionResolver
ConstrainedConstructionResolver(SymbolsAndScopes symbolsAndScopes)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<EK9Parser.CallContext, ConstrainedConstructionResolver.Site>
-