@@ -2571,7 +2571,7 @@ defmodule Kernel do
2571
2571
end
2572
2572
end
2573
2573
2574
- Record . access ( atom , fields , args , caller )
2574
+ Record.Deprecated . access ( atom , fields , args , caller )
2575
2575
false ->
2576
2576
case caller . in_match? or caller . in_guard? do
2577
2577
true -> raise ArgumentError , message: "dynamic access cannot be invoked inside match and guard clauses"
@@ -3010,6 +3010,10 @@ defmodule Kernel do
3010
3010
end
3011
3011
3012
3012
@ doc ~S"""
3013
+ Note: Records are mostly deprecated and being slowly removed from
3014
+ the language. The set of supported record operations will be
3015
+ maintained in the Record module.
3016
+
3013
3017
Exports a module with a record definition and runtime operations.
3014
3018
3015
3019
Please see the `Record` module's documentation for an introduction
@@ -3123,12 +3127,16 @@ defmodule Kernel do
3123
3127
"""
3124
3128
defmacro defrecord ( name , fields , do_block \\ [ ] ) do
3125
3129
case is_list ( fields ) and Keyword . get ( fields , :do , false ) do
3126
- false -> Record . defrecord ( name , fields , do_block )
3127
- other -> Record . defrecord ( name , Keyword . delete ( fields , :do ) , do: other )
3130
+ false -> Record.Deprecated . defrecord ( name , fields , do_block )
3131
+ other -> Record.Deprecated . defrecord ( name , Keyword . delete ( fields , :do ) , do: other )
3128
3132
end
3129
3133
end
3130
3134
3131
3135
@ doc ~S"""
3136
+ Note: Records are mostly deprecated and being slowly removed from
3137
+ the language. The set of supported record operations will be
3138
+ maintained in the Record module.
3139
+
3132
3140
Defines a set of private macros to manipulate a record definition.
3133
3141
3134
3142
This macro defines a set of macros private to the current module to
@@ -3185,7 +3193,7 @@ defmodule Kernel do
3185
3193
3186
3194
"""
3187
3195
defmacro defrecordp ( name , tag \\ nil , fields ) do
3188
- Record . defrecordp ( name , Macro . expand ( tag , __CALLER__ ) , fields )
3196
+ Record.Deprecated . defrecordp ( name , Macro . expand ( tag , __CALLER__ ) , fields )
3189
3197
end
3190
3198
3191
3199
@ doc """
@@ -3304,7 +3312,7 @@ defmodule Kernel do
3304
3312
end )
3305
3313
3306
3314
fields = quote do: [ __exception__: :__exception__ ] ++ unquote ( fields )
3307
- record = Record . defrecord ( name , fields , do_block )
3315
+ record = Record.Deprecated . defrecord ( name , fields , do_block )
3308
3316
3309
3317
quote do
3310
3318
{ :module , name , _ , _ } = unquote ( record )
0 commit comments