File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
lib/elixir/test/elixir/module/types Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,31 @@ defmodule Module.Types.IntegrationTest do
195
195
196
196
assert_warnings ( files , warnings )
197
197
end
198
+
199
+ test "unused generated overridable private clauses" do
200
+ files = % {
201
+ "a.ex" => """
202
+ defmodule A do
203
+ use B
204
+ def public(x), do: private(x)
205
+ defp private(x), do: super(List.to_tuple(x))
206
+ end
207
+ """ ,
208
+ "b.ex" => """
209
+ defmodule B do
210
+ defmacro __using__(_) do
211
+ quote generated: true do
212
+ defp private({:ok, ok}), do: ok
213
+ defp private(:error), do: :error
214
+ defoverridable private: 1
215
+ end
216
+ end
217
+ end
218
+ """
219
+ }
220
+
221
+ assert_no_warnings ( files )
222
+ end
198
223
end
199
224
200
225
describe "undefined warnings" do
You can’t perform that action at this time.
0 commit comments