RoyalIcing / Orb

Write WebAssembly with Elixir
https://useorb.dev
BSD 3-Clause "New" or "Revised" License
174 stars 1 forks source link

no function clause matching in Orb.ToWat.Instructions.do_wat/2 #38

Open orsinium opened 3 weeks ago

orsinium commented 3 weeks ago
** (FunctionClauseError) no function clause matching in Orb.ToWat.Instructions.do_wat/2    

    The following arguments were given to Orb.ToWat.Instructions.do_wat/2:

        # 1
        nil

        # 2
        "    "

    Attempted function clauses (showing 4 out of 4):

        def do_wat(+list+, +indent+) when -is_list(list)-
        def do_wat(+value+, +indent+) when -is_integer(value)-
        def do_wat(+value+, +indent+) when -is_float(value)-
        def do_wat(-%_struct{} = value-, +indent+)

    (orb 0.0.46) lib/orb/to_wat/instructions.ex:6: Orb.ToWat.Instructions.do_wat/2
    (orb 0.0.46) lib/orb/instruction_sequence.ex:207: anonymous fn/2 in Orb.ToWat.Orb.InstructionSequence.to_wat/2
    (elixir 1.17.1) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
    (orb 0.0.46) lib/orb/func.ex:74: Orb.ToWat.Orb.Func.to_wat/2
    (elixir 1.17.1) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
    (orb 0.0.46) lib/orb/module_definition.ex:169: Orb.ToWat.Orb.ModuleDefinition.to_wat/2
    (orb 0.0.46) lib/orb.ex:1015: Orb.to_wat/1
    (firefly_elixir 0.1.0) lib/mix/tasks/wasm.ex:11: Mix.Tasks.Wasm.run/

To reproduce:

  1. Clone https://github.com/firefly-zero/firefly-elixir
  2. Switch to https://github.com/firefly-zero/firefly-elixir/commit/34848b6bb49e66ab11f0e10aee52227e5c79a081
  3. Run task