More docs
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user