Skip to content

Commit

Permalink
Allow dropping result type
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyalIcing committed Jan 6, 2024
1 parent d5b89bc commit 4cbd5b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/orb/import.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule Orb.Import do
end

defmodule DSL do
defmacro defw(call, result_type) do
defmacro defw(call, result_type \\ nil) do
alias Elixir.Orb.{DefwDSL, Func, Import}

env = __CALLER__
Expand Down
4 changes: 2 additions & 2 deletions test/orb_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ defmodule OrbTest do
defmodule Log do
use Orb.Import

defw(int32(a: I32), nil)
defw(int64(a: I64), nil)
defw(int32(a: I32))
defw(int64(a: I64))
end

defmodule Time do
Expand Down

0 comments on commit 4cbd5b2

Please sign in to comment.