Skip to content

Commit cce861e

Browse files
committed
Improve docs and move all types tests to a single directory
1 parent 9b388a5 commit cce861e

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

lib/elixir/lib/module/types/remote.ex

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ defmodule Module.Types.Remote do
5050
end
5151
end
5252

53-
# TODO: Properly handle protocols
53+
# The protocol code dispatches to unknown modules, so we ignore them here.
54+
#
55+
# try do
56+
# SomeProtocol.Atom.__impl__
57+
# rescue
58+
# ...
59+
# end
60+
#
61+
# But for protocols we don't want to traverse the protocol code anyway.
62+
# TODO: remove this clause once we no longer traverse the protocol code.
5463
defp warn_undefined?(_module, :__impl__, 1, _context), do: false
5564
defp warn_undefined?(_module, :module_info, 0, _context), do: false
5665
defp warn_undefined?(_module, :module_info, 1, _context), do: false

lib/elixir/test/elixir/module/checker_test.exs renamed to lib/elixir/test/elixir/module/types/integration_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Code.require_file("../test_helper.exs", __DIR__)
1+
Code.require_file("../../test_helper.exs", __DIR__)
22

3-
defmodule Module.CheckerTest do
3+
defmodule Module.Checker.IntegrationTest do
44
use ExUnit.Case
55

66
import ExUnit.CaptureIO

lib/elixir/test/elixir/module/types_test.exs renamed to lib/elixir/test/elixir/module/types/types_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Code.require_file("../test_helper.exs", __DIR__)
1+
Code.require_file("../../test_helper.exs", __DIR__)
22

3-
defmodule Module.TypesTest do
3+
defmodule Module.Types.TypesTest do
44
use ExUnit.Case, async: true
55
import Bitwise, warn: false
66
alias Module.Types

0 commit comments

Comments
 (0)