Skip to content

Commit

Permalink
Can only and/or i32
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyalIcing committed May 23, 2024
1 parent 4e9571d commit 681006f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/orb/numeric/dsl.ex
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ defmodule Orb.Numeric.DSL do
"""
def left or right do
case Ops.extract_common_type(left, right) do
type when Ops.is_primitive_integer_type(type) ->
Orb.Instruction.new(type, :or, [left, right])
:i32 ->
Orb.Instruction.new(:i32, :or, [left, right])

type when Ops.is_primitive_float_type(type) ->
raise ArgumentError, "Cannot OR two expressions of type #{type}."
Expand All @@ -272,8 +272,8 @@ defmodule Orb.Numeric.DSL do
"""
def left and right do
case Ops.extract_common_type(left, right) do
type when Ops.is_primitive_integer_type(type) ->
Orb.Instruction.new(type, :and, [left, right])
:i32 ->
Orb.Instruction.new(:i32, :and, [left, right])

type when Ops.is_primitive_float_type(type) ->
raise ArgumentError, "Cannot AND two expressions of type #{type}."
Expand Down

0 comments on commit 681006f

Please sign in to comment.