JR Mitchell

Results 10 comments of JR Mitchell

Thanks for the speedy response @hishamhm :) Is there a timeline for the introduction of interfaces? > (for backwards-compatibility, we could even extend this behavior to functions whose first argument...

Hi again @hishamhm, in writing logic and test cases for this feature, I found something else that seems like it might be a bug, but just wanted to check with...

I've opened a separate PR (#640) for the above issue, as it is related but separate behaviour.

That's a good point. `M.add(b)` is equivalent in syntax to `b:add()`, but in this case I think there could be situations where the former syntax is clearer. I will update...

> Not sure, because for functions that are intended to be used as "class methods" a la Java static (such as M.new above), those are usually declared with . rather...

https://github.com/teal-language/tl/pull/640/commits/7668e030f63d5a97373f547e7398e560a9a9462d suppresses the warning if the method is called directly from the typetype (e.g `M.add(b)`). I've added a test case for it, and it's passing all tests, but I'm not...

Hi @hishamhm, I was wondering if you could advise on the implementation of this behaviour for `self` indicating that a function in a record is a method. I've been able...

That sounds alright to me, I'll give it a go. I feel like I might encounter an issue with records with generics - for example, with the code: ``` record...

I just thought I'd note that the following (explicitly declaring the method type before assigning the method itself) does work: ```lua local record mod foo2: function(self) end function mod:foo1() self:foo2()...