[erlang-questions] Typespecs export not working as intended?
Mon Apr 18 15:56:03 CEST 2011
In this case I am running dialyzer on the source and it isn't
complaining. Is there a difference between source and compiled code
checking for dialyzer maybe?
I'd really like to get dialyzer to complain some more. ;)
On 04/18/2011 03:31 PM, Eric Merritt wrote:
> This is expected behaviour. You get the exact same behaviour with
> function calls. Basically, the remote types are not checked until
> evaluation time. In this case, that is when dialyzer or some other
> tool goes through and makes use of the specs. Erlang is a late binding
> language, both in function call and type references.
> On Mon, Apr 18, 2011 at 6:03 AM, Loïc Hoguin <essen@REDACTED> wrote:
>> I have ran into a weird issue while refactoring the type specs in a project.
>> It seems types in a module can be used even if they are not exported
>> using export_type. Neither of the compiler or dialyzer are complaining
>> about it.
>> For example, module a declares a type my_type(), module b uses it with
>> a:my_type(), no export_type in module, yet it still works.
>> Is that normal? The documentation clearly states that types should be
>> Loïc Hoguin
>> erlang-questions mailing list
More information about the erlang-questions