kazzix14 / mangrove

MIT License
3 stars 0 forks source link

Tapioca::Compiler::MangroveEnum generates invalid RBI when Hash or Array is passed as a inner type #8

Closed kazzix14 closed 10 months ago

kazzix14 commented 10 months ago

Like this one.

class MyEnum
  extend Mangrove::Enum

  variants do
    variant V0, [MyModel, Integer]
  end
end

The reason is Hash#to_s and Array#to_s is an alias of #inspect, which calls its children's SomeClass#inspect.

kazzix14 commented 10 months ago

this is fixed by #10