DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B7015: a construct the target syntax has no form for

Catalog status: active. Default severity: error. Stable name: untranslatable. Family: Driver and session failures.

veradic translate writes each unit in the target syntax with the same meaning. A few of Vada's and Varc's constructs have no form in Vibe, which is Python: a package renaming, a fixed or decimal fixed point type, an out parameter or a scalar in out one (a Python call cannot change a number it is given), an access-to-subprogram parameter, an array indexed by a range that does not start at 0. The translation names each such construct, marks where it is, and writes no files.

Example (Vada)

package Money is
   type Cents is delta 0.01 digits 8;
   procedure Halve (Value : Integer; Half : out Integer);
end Money;
$ veradic translate --to vibe -o out money.vads money.vadb
error[B7015]: Vibe cannot write the decimal fixed point type `Cents`, which Vibe has no form for: declare it in a Vada or Varc package, and import it
error[B7015]: Vibe cannot write the `out` parameter `Half` of `Halve`, ...

What to do

Keep the units that hold these constructs in Vada or Varc, and translate the others: a Vibe module imports a Vada or Varc package, uses its types and calls its procedures, an out parameter's value being the call's result (half: int = money.halve(7)). Or rewrite the construct with one Vibe has: an array indexed from 0 (size=), or by a named subtype (index=); a function that returns its results instead of a procedure that sets them.

Regression source and further reading

Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.

See driver and session failures, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.