summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@plataformatec.com.br>2018-03-18 13:06:59 +0100
committerJosé Valim <jose.valim@plataformatec.com.br>2018-03-18 13:06:59 +0100
commit7d3523f72a8f4fa8c5efce840337dc3030e4faa7 (patch)
tree834e0b8f86dfd39728d8c65da1146b3b50e2432c
parent0292623c1c1db6d741670507a7fcb3ce56ee3d3c (diff)
downloadelixir-jv-code-typespecs.tar.gz
Consider UTF-8 in type variablesjv-code-typespecs
-rw-r--r--lib/elixir/lib/code/typespec.ex8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/elixir/lib/code/typespec.ex b/lib/elixir/lib/code/typespec.ex
index ffeafdc96..9ad60d349 100644
--- a/lib/elixir/lib/code/typespec.ex
+++ b/lib/elixir/lib/code/typespec.ex
@@ -408,11 +408,11 @@ defmodule Code.Typespec do
defp erl_to_ex_var(var) do
case Atom.to_string(var) do
- <<"_", c::binary-1, rest::binary>> ->
- String.to_atom("_#{String.downcase(c)}#{rest}")
+ <<"_", c::utf8, rest::binary>> ->
+ String.to_atom("_#{String.downcase(<<c::utf8>>)}#{rest}")
- <<c::binary-1, rest::binary>> ->
- String.to_atom("#{String.downcase(c)}#{rest}")
+ <<c::utf8, rest::binary>> ->
+ String.to_atom("#{String.downcase(<<c::utf8>>)}#{rest}")
end
end