-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stdlib: allow variables in record definitions
create an init function e.g. rec_init$^0, for each record with definitions containing variables. e.g. -record(r, {f = fun(X)->case X of {y, Y} -> Y; _ -> X end, g=..., h=abc}). foo(X)->\#r{}. --> foo(X)->(rec_init()){}. rec_init() will initialize all fields with the default values If one field is set and the omitted field default value has variables, then a new init function is created that only initializes the omitted fields. - removes lint error for variables in definitions - updates erl_lint_SUITE and erl_expand_records_SUITE to work with this new behavior - adds handling of records that are calling functions to the shell - records calling local non exported functions will fail initialization
- Loading branch information
1 parent
befaffa
commit f8dfae2
Showing
7 changed files
with
225 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.