Skip to main content

Mojo function

codegen_unreachable

codegen_unreachable[cond: Bool, msg: StringSlice[StaticConstantOrigin], *extra: StringSlice[StaticConstantOrigin]]()

Compilation fails if cond is True and the caller of the function is being generated as runtime code.

Parameters:

  • โ€‹cond (Bool): The bool value for reachability.
  • โ€‹msg (StringSlice): The message to display on failure.
  • โ€‹*extra (StringSlice): Additional messages to concatenate to msg.

Was this page helpful?