Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Implementation: allow to lookup class and module implementations #7742
I think it is totally useful, however this implementation cannot work on some corner case. One corner case, method argument restriction:
def foo(x : ‸Foo) end foo
It is hard to implement for now. Another corner case, macro argument:
record Foo, x : ‸Bar
It is impossible.
@faustinoaq Sorry for the late. Is this okay?
@bcardiff Thank you for reviewing!
class Foo end class Bar end alias Baz = Foo | Bar Baz
$ bin/crystal tool implementation -c foo.cr:9:1 foo.cr 1 implementation found foo.cr:7:1
Unfortunately this doesn't work:
$ bin/crystal tool implementation -c foo.cr:7:15 foo.cr no implementations or method call found
I think implementing this is hard for now...