goby-lang / api.doc

API Documentation for goby language
https://goby-lang.github.io/api.doc/
7 stars 2 forks source link

Panic on including two modules twice #2

Closed hachi8833 closed 7 years ago

hachi8833 commented 7 years ago

The following encounters panic runtime: goroutine stack exceeds 1000000000-byte limit fatal error: stack overflow while it works on Ruby:

module Foo
  def ten
    10
  end
end

module Bar
  def twenty
    20
  end
end

class Baz
  include(Bar)
  include(Foo)
end

class Baz
  include(Bar)
  include(Foo)
end

But the following works both on Goby and Ruby:

module Foo
  def ten
    10
  end
end

class Baz
  include(Foo)
end

class Baz
  include(Foo)
end

The following works as well on Goby and Ruby:

module Foo
  def ten
    10
  end
end

module Bar
  def twenty
    20
  end
end

class Baz
  include(Bar)
  include(Foo)
end
hachi8833 commented 7 years ago

Sorry, wrong repository.