Skip to content

exprecs dialyzer error if record is an opaque type #6

@ransomr

Description

@ransomr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions