uwiger / parse_trans

Parse transform utilities for Erlang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exprecs dialyzer error if record is an opaque type

ransomr opened this issue · comments

R16B

-module(exprecs_specs).
-compile({parse_transform, exprecs}).
-export_records([r]).
-record(r, {f}).
-opaque r() :: #r{}.
-export_type([r/0]).

Proceeding with analysis...
exprecs_specs.erl:39: The contract exprecs_specs:'#set-r'(['#prop-r'()],#r{}) -> #r{} cannot be right because the inferred return for '#set-r'(Vals::any(),Rec::exprecs_specs:r()) on line 39 is any()
exprecs_specs.erl:39: The contract exprecs_specs:'#get-r'('f',#r{}) -> any()
; (['#attr-r'()],#r{}) -> [any()] cannot be right because the inferred return for '#get-r'(Attrs::any(),Rec::exprecs_specs:r()) on line 39 is any()
exprecs_specs.erl:39: The contract exprecs_specs:'#new-r'() -> #r{} cannot be right because the inferred return for '#new-r'() on line 39 is exprecs_specs:r()
exprecs_specs.erl:39: The contract exprecs_specs:'#fromlist-r'(['#prop-r'()],#r{}) -> #r{} cannot be right because the inferred return for '#fromlist-r'(Vals::any(),Rec::exprecs_specs:r()) on line 39 is any()
exprecs_specs.erl:39: The contract exprecs_specs:'#set-r'(['#prop-r'()],#r{}) -> #r{} cannot be right because the inferred return for '#set-r'(Vals::any(),exprecs_specs:r()) on line 39 is any()
exprecs_specs.erl:39: Function '#set-'/2 has no local return
exprecs_specs.erl:39: Function '#get-'/2 has no local return
exprecs_specs.erl:39: Function '#new-'/1 has no local return
exprecs_specs.erl:39: Function '#fromlist-r'/1 has no local return
exprecs_specs.erl:39: Function '#fromlist-'/2 has no local return
exprecs_specs.erl:39: Function '#new-r'/1 has no local return