Skip to content

Commit

Permalink
Merge pull request moonbitlang#449 from Yu-zh/panic
Browse files Browse the repository at this point in the history
add panic
  • Loading branch information
Yu-zh authored May 27, 2024
2 parents 720de77 + e3a9677 commit 1ea8478
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin/builtin.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ fn op_lt[T : Compare + Eq](T, T) -> Bool

fn op_notequal[T : Eq](T, T) -> Bool

fn panic[T]() -> T

fn physical_equal[T](T, T) -> Bool

fn print[T : Show](T) -> Unit
Expand Down
2 changes: 2 additions & 0 deletions builtin/intrinsics.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ pub fn print_string(s : String) -> Unit = "%print_string"

pub fn abort[T](msg : String) -> T = "%abort"

pub fn panic[T]() -> T = "%panic"

// Bool primitive ops

pub fn Bool::not(self : Bool) -> Bool = "%bool_not"
Expand Down

0 comments on commit 1ea8478

Please sign in to comment.