[erlang-questions] Polymorphic opaque types and dialyzer

Dmitry Groshev lambdadmitry@REDACTED
Tue Mar 13 13:38:08 CET 2012


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