~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/dialyzer/src/dialyzer_bif_constraints.inc

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
509
509
               end
510
510
           end,
511
511
  ArgV = mk_fun_var(ArgFun, [Dst]),
512
 
  mk_conj_constraint_list([mk_constraint(Dst, sub, t_bool()),
 
512
  DstFun = fun(Map) ->
 
513
               ArgType = lookup_type(Arg, Map),
 
514
               case t_is_none(t_inf(ArgType, Type)) of
 
515
                 true -> t_from_term(false);
 
516
                 false -> 
 
517
                   case t_is_subtype(ArgType, Type) of
 
518
                     true -> t_from_term(true);
 
519
                     false -> t_bool()
 
520
                   end
 
521
               end
 
522
           end,
 
523
  DstV = mk_fun_var(DstFun, [Arg]),
 
524
  mk_conj_constraint_list([mk_constraint(Dst, sub, DstV),
513
525
                           mk_constraint(Arg, sub, ArgV)]).