ek9_make_concrete

Removes 'as abstract' from the declaration (keeping 'as open' unless keepOpen:false) so the construct can be instantiated; answers status, edits[] and conflicts[] listing every remaining abstract member (kind 'abstract-method').

Category: Editor · Compare: Refactor → Make Class Concrete

When to use it

'Make Shape concrete' is one call with symbol:'Shape' - no file or line needed. Use it on an 'as abstract' class/record/component/function whose abstract members are all implemented, to allow direct instantiation.

When not to use it

Details

keepOpen (default true) emits 'as open' to preserve the extensibility abstract implied per QA0102 — removing abstract alone would silently CLOSE the class; keepOpen:false makes it concrete-and-closed in one step (avoid on sealed types, which need 'as open' per E05270). Traits are always abstract and are rejected as an unsupported construct. Conflicts carry kind 'abstract-method' with name/signature/line (mechanical: implement each body, then re-call) or 'already-concrete'; would-fail flags subclass cascade errors.

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.
keepOpenbooleanWhether the resulting concrete class should be 'as open' (default true) or closed (false).
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.

Recorded calls

Real calls, recorded against small projects and checked on every build - a changed answer fails it.

Make concrete empty abstract

Request

{
  "file" : "main.ek9",
  "line" : 24
}

Response

{
  "conflicts" : [ ],
  "edits" : [ {
    "after" : "    EmptyAbstract as open",
    "before" : "    EmptyAbstract as abstract",
    "endLine" : 24,
    "file" : "main.ek9",
    "startLine" : 24,
    "type" : "replace"
  } ],
  "meta" : {
    "serverMs" : "<timing>"
  },
  "risk" : {
    "crossesModuleBoundary" : false,
    "estimatedSeverity" : "high",
    "fileCount" : 1,
    "lineCount" : 1,
    "touchesPublicApi" : true,
    "touchesTests" : false
  },
  "status" : "applied",
  "summary" : "Changed class EmptyAbstract → as open (concrete)",
  "workspaceHash" : "<workspace-hash>",
...

Cut short here: 3 more lines. The whole recorded call.

Make concrete abstract members conflicts

Request

{
  "file" : "main.ek9",
  "line" : 15
}

Response

{
  "conflicts" : [ {
    "kind" : "abstract-method",
    "line" : 16,
    "name" : "area",
    "signature" : "public Float <- area() as abstract"
  } ],
  "edits" : [ ],
  "meta" : {
    "serverMs" : "<timing>"
  },
  "risk" : {
    "crossesModuleBoundary" : false,
    "estimatedSeverity" : "trivial",
    "fileCount" : 0,
    "lineCount" : 0,
    "touchesPublicApi" : false,
    "touchesTests" : false
  },
  "status" : "conflicts",
  "summary" : "Class has 1 abstract method(s) that must be implemented or removed before making concrete",
  "workspaceHash" : "<workspace-hash>",
  "wouldBeDiagnostics" : [ ],
  "written" : false
...

Cut short here: 1 more lines. The whole recorded call.

See also