title: function arguments expected near ','
body: <p>I have a class defined like so:</p>
  
  <pre><code>local MyClass = {
   _VERSION = 'MyClass 1.0.0'
  }
  MyClass.__index = MyClass
  
  setmetatable(MyClass, {
      __call = function (cls, ...)
          return cls.new(...)
      end
  })
  
  function MyClass.new(prop1)
      local self = setmetatable({}, MyClass)
      self.prop1 = prop1
      return self
  end
  
  function MyClass:msg(txt)
      self.prop1 = txt
      print(self.prop1)
  end
  
  function MyClass:callFunc(func, ...)
      pcall(func, ...)
  end
  </code></pre>
  
  <p>My client code may look like:</p>
  
  <pre><code>local inst = MyClass("value 1")
  inst:msg("Hello world")
  inst:callFunc(inst:msg, "Hello again")
  </code></pre>
  
  <p>When I run this client code, I get an error message</p>
  
  <blockquote>
    <p>function arguments expected near ','</p>
  </blockquote>
  
  <p>The code is completely reprodicible. You can easily check it <a href="https://www.lua.org/cgi-bin/demo" rel="nofollow noreferrer">here</a>. Just copy paste and run it and you will get this error message. How can I fix it?</p>