More docs

This commit is contained in:
José Valim
2026-01-10 19:53:21 +01:00
parent 7f5e4e3bb2
commit f2ff3a7a86
+3
View File
@@ -1328,6 +1328,9 @@ defmodule Module.Types.Apply do
Computes the return type of an application.
"""
def return(type, args_types, stack) do
# An argument being gradual does not imply the return type
# is gradual in static mode. However, we do wrap in dynamic
# in :dynamic / :gradual mode to avoid false positives.
cond do
stack.mode == :static -> type
Enum.any?(args_types, &gradual?/1) -> dynamic(type)