Skip to content

Commit

Permalink
Make dynamic warning stronger
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed May 9, 2024
1 parent b92e284 commit 7d65d93
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/gleam/dynamic.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ fn do_from(a: anything) -> Dynamic

/// Unsafely casts a Dynamic value into any other type.
///
/// This is an escape hatch for the type system that may be useful when wrapping
/// native Erlang APIs. It is to be used as a last measure only!
/// **If you are using this function then you are almost certainly doing
/// the wrong thing**.
///
/// If you can avoid using this function, do!
/// This is an escape hatch for the type system that may be useful when wrapping
/// native Erlang APIs. You should always avoid using this function as it
/// undermines the type system and removes all the guarentees that Gleam offers
/// you. You are on your own to avoid cryptic runtime bugs and crashes if you
/// use this.
///
pub fn unsafe_coerce(a: Dynamic) -> anything {
do_unsafe_coerce(a)
Expand Down

0 comments on commit 7d65d93

Please sign in to comment.