warn function Compile

void warn(
  1. String message,
  2. {bool deprecation = false}
)

Prints a warning message associated with the current @import or function call.

If deprecation is true, the warning is emitted as a deprecation warning.

This may only be called within a custom function or importer callback.

Implementation

void warn(String message, {bool deprecation = false}) =>
    EvaluationContext.current
        .warn(message, deprecation ? Deprecation.userAuthored : null);