File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,17 @@ defmodule Kernel.Typespec do
70
70
or
71
71
(type, type -> type)
72
72
73
+ ## Notes
74
+
75
+ Elixir discourages the use of type `string()` as it might be confused
76
+ with binaries which are referred to as "strings" in Elixir (as opposed to
77
+ character lists). In order to use the type that is called `string()` in Erlang,
78
+ one has to use the `char_list()` type which is a synonym to `string()`. If yu
79
+ use `string()`, you'll get a warning from the compiler.
80
+
81
+ If you want to refer to the "string" type (the one operated by functions in the
82
+ String module), use `String.t()` type instead.
83
+
73
84
See http://www.erlang.org/doc/reference_manual/typespec.html
74
85
for more information.
75
86
"""
You can’t perform that action at this time.
0 commit comments