Skip to content

Commit b8d02e9

Browse files
author
José Valim
committed
Merge pull request #2296 from alco/record-doc
Fix example of using `defrecord`
2 parents da03542 + d9a8bbb commit b8d02e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/elixir/lib/record.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ defmodule Record do
149149
Record.defrecord :user, User, name: nil
150150
end
151151
152-
user() #=> {User, nil}
152+
require User
153+
User.user() #=> {User, nil}
153154
154155
"""
155156
defmacro defrecord(name, tag \\ nil, kv) do

0 commit comments

Comments
 (0)