Class CloseCallTarget
close call - try-with-resources, the closeable temporaries a
statement owns and the generated close chain all reach it through ResourceCloser.closeCall, so they
cannot name different owners or dispatch differently.
The call names the type that DECLARES close (CallTargetResolution's invariant), not the resource's
static type: a class that takes close from a trait (the built-in Transaction's default) has
no close of its own, and the native back end resolves by (declaring type, member) - naming the class
linked against a function no module defines (fuzz6 2026-10-04). Trait dispatch follows that declaring type.
Dispatch is decided exactly as for an ordinary call (CallTargetResolution.isVirtualCall(ISymbol, ISymbol)): from the
resolved close and the value's STATIC type. A value typed as an open or abstract class, or a trait, may
at runtime be a subtype that overrides operator close, so its close is virtual; a closed class's is
not. The chain's super close is a super call and is never virtual - the caller decides that, not this.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe CALL's target type and how it is dispatched. -
Method Summary
Modifier and TypeMethodDescriptionstatic CloseCallTarget.TargetThe owner type name and dispatch flags for closing a value whose static TYPE is known.
-
Method Details
-
ofType
The owner type name and dispatch flags for closing a value whose static TYPE is known.- Parameters:
staticType- the value's static typestaticTypeName- the IR name of that type (keeps any Scenario-3 substitution)- Returns:
- the target
-