Skip to main content

L1210 - Bad inline

Error

    -compile({inline, [foo/1]}).
%% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 💡 error: inlined function foo/1 undefined

Explanation

This error occurs when you specify a function for inlining with the -compile({inline, ...}) directive, but the function is not defined in the module.

Common causes include:

  • Mismatched arity (number of arguments)
  • Typos in the function name
  • Function doesn't exist in the module

To fix this error:

  1. Ensure the function name and arity match exactly
  2. Verify the function exists in the module
  3. Check for typos in the function name
%% Correct inline directive
-compile({inline, [foo/0]}).

foo() -> ok.