Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix suggestions when using typespecs returning a remote type
As shown in the following code: ``` defmodule Mod do @SPEC fun() :: NaiveDateTime.t() def fun(), do: NaiveDateTime.new(1, 2) def some do var = fun() var.h # ^ suggestion here end end ``` It should be able to suggest from NaiveDateTime. This wasn't working before because the `__aliases__` weren't being handled: ``` iex(1)> Code.string_to_quoted("@SPEC fun() :: NaiveDateTime.t()") {:ok, {:@, [line: 1], [ {:spec, [line: 1], [ {:"::", [line: 1], [ {:fun, [line: 1], []}, {{:., [line: 1], [{:__aliases__, [line: 1], [:NaiveDateTime]}, :t]}, [line: 1], []} ]} ]} ]}} ```
- Loading branch information