You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Require mutability backing in private-row signature inclusion
The private/open-object manifest path in includecore compared paired
fields by type only, so a signature could declare
type t = private {..@set "x": int} over an implementation whose field was
not settable - and since access follows the published row, clients could
write straight through the abstraction. In the phantom-setter encoding
this could not happen structurally: granting required an interface
"x#=" member with no implementation partner (rejected by the missing-
field check), while forgetting was the interface simply omitting the
member (absorbed by the ignored implementation-side misses). Stage D
turned the capability into a flag on the field, and nothing had taken
over the width mechanism's job.
The pairing now requires a settable implementation field wherever the
interface field is settable; an implementation's settable field may
still be abstracted to a read-only one. Probe-verified equivalent to the
released (phantom-encoding) compiler in all directions, including that
paired field types remain compared by equality - private rows allow
width and capability forgetting, never depth subtyping.
The @set inclusion matrix is now pinned per comparison arm, since the
flag participates in several independently-changeable relations:
object_private_row_grants_set (the new includecore rule),
object_manifest_set_mismatch (transparent manifests are equations -
eqtype), object_value_signature_set_mismatch (value signatures claim
instances - moregeneral), and the legal forgetting direction compiles in
object_mutability_pin.res.
Signed-Off-By: Cristiano Calcagno <ccrisccris@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PCtQiaDijUqA2fujQXvKUw
|`Value_descriptions`| ✓ |`super_errors_multi/Iface_value_descriptions`, `super_errors_multi/Iface_value_arity_mismatch`, `super_errors_multi/Smoke_interface_mismatch`, `super_errors_multi/Cross_external_spec_mismatch`, `super_errors_multi/Cross_external_payload_name`, `super_errors_multi/Cross_external_import_attrs`, `module_sig_value_arity_mismatch*.res`| Arity mismatches print a dedicated hint (implementation vs interface argument counts), including through aliases and nested function types. |
366
+
|`Value_descriptions`| ✓ |`super_errors_multi/Iface_value_descriptions`, `super_errors_multi/Iface_value_arity_mismatch`, `super_errors_multi/Smoke_interface_mismatch`, `super_errors_multi/Cross_external_spec_mismatch`, `super_errors_multi/Cross_external_payload_name`, `super_errors_multi/Cross_external_import_attrs`, `module_sig_value_arity_mismatch*.res`, `object_value_signature_set_mismatch.res`| Arity mismatches print a dedicated hint (implementation vs interface argument counts), including through aliases and nested function types. The object fixture pins that a value signature cannot drop `@set` from an object type (moregeneral requires equal field mutability). |
|`Kind`| ✓ |`super_errors_multi/Iface_kind_mismatch`| Record-in-impl vs variant-in-interface. |
389
389
|`Constraint`| ✓ |`super_errors_multi/Iface_constraint_mismatch`| Implementation adds a `constraint 'a = …`; interface has none. |
390
-
|`Manifest`| ✓ |`super_errors_multi/Iface_manifest_mismatch`, `type_decl_function_arity_mismatch.res`| Manifest types differ, including function types with different arities. |
390
+
|`Manifest`| ✓ |`super_errors_multi/Iface_manifest_mismatch`, `type_decl_function_arity_mismatch.res`, `object_private_row_grants_set.res`, `object_manifest_set_mismatch.res`| Manifest types differ, including function types with different arities. The object fixtures pin the `@set` inclusion matrix: a private row's signature cannot grant `@set` its implementation lacks (but may forget it — pinned compiling in `object_mutability_pin.res`), while a transparent manifest is an equation and cannot forget it either. |
0 commit comments