Commit 13cec37f authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Use the :local option in statics in singleton check.

We don't care about static members inherited from parents and mixins -
they could be completely valid in those other classes - it's the
concrete singleton who's statics interest us.
parent 0438e62e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ module JsDuck
    def warn_singleton_statics
      @relations.each do |cls|
        if cls[:singleton]
          cls.find_members({:static => true}).each do |m|
          cls.find_members({:local => true, :static => true}).each do |m|
            warn(:sing_static, "Static members don't make sense in singleton class #{@doc[:name]}", m)
          end
        end