Skip to content

Commit

Permalink
add panic
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu-zh committed May 27, 2024
1 parent 720de77 commit e3a9677
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 e3a9677

Please sign in to comment.