Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exprecs dialyzer error if record is an opaque type #6

Open
ransomr opened this issue Jun 13, 2013 · 0 comments
Open

exprecs dialyzer error if record is an opaque type #6

ransomr opened this issue Jun 13, 2013 · 0 comments

Comments

@ransomr
Copy link

ransomr commented Jun 13, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant