[erlang-questions] Polymorphic opaque types and dialyzer
Luca Favatella
luca.favatella@REDACTED
Mon Jul 7 15:18:37 CEST 2014
> Any update on this? Any plans for Dialyzer to ever support polymorphic
> opaque types?
Hi Siraaj,
With OTP 17.1 your example gives me "done (passed successfully)". Have you tried retesting it?
$ dialyzer --src opaque.erl --plt [...]
Checking whether the PLT [...] is up-to-date... yes
Proceeding with analysis... done in 0m1.69s
done (passed successfully)
(The exit status is 0)
$ cat opaque.erl
-module(opaque).
-opaque test(A) :: {A, A}.
Regards
Luca
> On 03/13/2012 08:38 AM, Dmitry Groshev wrote:
> > Dialyzer can't handle polymorphic opaque type:
> >
> > $ echo "-module(opaque)." >> opaque.erl
> > $ echo "-opaque test(A) :: {A, A}." >> opaque.erl
> > $ dialyzer --src opaque.erl
> > Checking whether the PLT
> > /home/si14/work/repos/saelmon/.saelmon_dialyzer.plt is up-to-date...
> > yes
> > Proceeding with analysis...
> > =ERROR REPORT==== 13-Mar-2012::16:32:50 ===
> > Error in process <0.30.0> with exit value:
> > {{nocatch,{error,"Polymorphic opaque types not supported
> > yet"}},[{erl_types,'-t_opaque_from_records/1-anonymous-2-',3,[{file,"erl_types.erl"},{line,564}]},{dict,map_bucket,2,[{file,"dict.erl"},{line,459}]},{dict,map_bkt_list,2,...
> >
> >
> > dialyzer: Analysis failed with error:
> > {{nocatch,{error,"Polymorphic opaque types not supported yet"}},
> > [{erl_types,'-t_opaque_from_records/1-anonymous-2-',3,
> > [{file,"erl_types.erl"},{line,564}]},
> > {dict,map_bucket,2,[{file,[...]},{line,...}]},
> > {dict,map_bkt_list,2,[{file,...},{...}]},
> > {dict,map_bkt_list,2,[{...}|...]},
> > {dict,map_seg_list,2,[...]},
> > {dict,map_dict,2,...},
> > {erl_types,t_opaque_from_records,...},
> > {dialyzer_typesig,...}]}
> > Last messages in the log cache:
> > Reading files and computing callgraph... done in 0.06 secs
> > Removing edges... done in 0.01 secs
> > Typesig analysis for SCC: [{opaque,module_info,0}]
> >
> > Is there any solution to this? Will it be fixed in upcoming releases of
> > Erlang?
More information about the erlang-questions
mailing list