DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B0107: misspelt elsif

Catalog status: active. Default severity: error. Stable name: misspelt-elsif. Family: Syntax and source text.

Ada's keyword for "else if" in an if statement is elsif. elseif and elif (from other languages) are read as elsif and reported. (else if on two words is legal Ada, but starts a nested if that needs its own end if;.)

Example (Vada)

   elseif X < 0 then

What to do

Write elsif.

Regression source and further reading

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

See syntax and source text, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.