Skip to content

Conversation

@marcoeilers
Copy link
Contributor

For example,

method test0(x: Ref)
{
   @msg("Custom error message") assert x != null
}

leads to Silicon output

Silicon found 1 error in 2.83s:
  [0] Custom error message

Requested by @tdardinier.

@jcp19
Copy link
Contributor

jcp19 commented Aug 16, 2025

can this annotation be used in function preconditions too to override the error message if the precondition does not hold?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants