Class ConstrainedConstructionResolver
java.lang.Object
org.ek9lang.compiler.phase5.ConstrainedConstructionResolver
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 ConstrainedConstructorListener (which errors when a
literal argument provably violates the constraint, E07xxx) 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record -
Method Summary
Modifier and TypeMethodDescription(package private) static ConstrainedConstructionResolver.Siteresolve(EK9Parser.CallContext ctx, SymbolsAndScopes symbolsAndScopes)
-
Method Details
-
resolve
static ConstrainedConstructionResolver.Site resolve(EK9Parser.CallContext ctx, SymbolsAndScopes symbolsAndScopes)
-