ek9_unseal_type

Removes the 'allow only A, B, C' clause from a sealed class or trait, keeping its 'as open' / 'as abstract'; answers status and edits[] (one REPLACE on the declaration line), or conflicts[] (kind 'already-unsealed') when there is no clause.

Category: Editor · Compare: Remove sealed modifier (no direct IDE precedent)

When to use it

'Unseal Shape' is one call with symbol:'Shape' - no file or line needed. Use it when a sealed class or trait's `allow only ...` subtype set is no longer warranted and the type should be openly extensible again.

When not to use it

Details

Class or trait targets only (a record/component/function target errors); a target that is not sealed is status:conflicts with kind 'already-unsealed'. The extensibility modifier is always preserved (sealed classes require `as open` OR `as abstract` per E05270; traits carry none). Unsealing is a WIDENING change — existing subtypes were all in the removed allowlist so they keep compiling, and prior E05240 blocks on new extensions are resolved. The design cost is that dispatchers over the target silently lose compile-time exhaustiveness per E05260 (new subtypes then hit the default fallback) — check ek9_query_dispatchers before committing.

Arguments

ArgumentTypeRequiredWhat it is
filestringThe EK9 source file - OPTIONAL when symbol is a construct name; required to anchor on a member or a use site.
lineinteger1-based line of the declaration or a reference - OMIT it and pass symbol:'<name>' to let the tool find the line (a model counting lines in a file miscounts); if you do count, use ek9_read_file(lineNumbers:true).
symbolstringA construct NAME alone ('Shape', 'sample.deps.core::Validator') - no file needed, the tool finds it workspace-wide; or, with file (+ line), the identifier you mean there.

It also takes the arguments every tool takes.

See also