Hello. Trying some simple code:
type
sometype1 = object
a: int
sometype1_ref = ref sometype1
proc get_a(s: sometype1_ref): int = s.a
proc create(): sometype1_ref = new sometype1_ref
let k = create()
echo k.get_a
but nimsuggest on type
echo k.
suggest only 'a' and no 'get_a()'. If I change code like this:
proc get_a(s: sometype1): int = s.a
(i.e. not Ref) - nimsuggest starts to suggest 'get_a()' but it's wrong and compiler show error on this code.
I made some investigation and found that error from wrong type of 'k' - nimsuggest thinks that k is tyObject type in sigmatch.typeRel().
Trying on devel branch of Nim.