Skip to content

IDL Problem Code 98 with alias incomplete-ternary

Want to disable me? Check out the configuration guide to learn more.

Execution Error

This is a fatal error that prevents IDL from compiling or running code

This problem indicates that a ternary operator is incomplete. Ternary operators are in-line if-then-else statements.

Here's an example of an incorrect ternary operator:

idl
a = !true ? 'It is true'
;            ^^^^^^^ incomplete ternary

Which can be fixed by adding the second half:

idl
a = !true ? 'It is true' : 'It is not true :('
;   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OK!

Licensed under MIT.