File tree Expand file tree Collapse file tree 4 files changed +4
-2
lines changed
Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2727 * [ File] ` File.iterator/1 ` and ` File.biniterator/1 ` are deprecated in favor of ` IO.stream/1 ` and ` IO.binstream/1 `
2828 * [ File] ` File.iterator!/2 ` and ` File.biniterator!/2 ` are deprecated in favor of ` File.stream!/2 ` and ` File.binstream!/2 `
2929 * [ Kernel] Deprecate recently added ` quote binding: ... ` in favor of the clearer ` quote bind_quoted: ... `
30+ * [ Kernel] Deprecate ` Kernel.float/1 ` in favor of a explicit conversion
3031 * [ Record] ` Record.__index__/2 ` deprecated in favor of ` Record.__record__(:index, key) `
3132
3233* backwards incompatible changes
Original file line number Diff line number Diff line change @@ -607,6 +607,7 @@ defmodule Kernel do
607607 """
608608 @ spec float ( number ) :: float
609609 def float ( number ) do
610+ IO . write "[WARNING] Kernel.float is deprecated, please do an explicit conversion instead\n #{ Exception . format_stacktrace } "
610611 :erlang . float ( number )
611612 end
612613
Original file line number Diff line number Diff line change @@ -854,7 +854,7 @@ defmodule String do
854854 { int_result , int_remainder } = :string . to_integer ( charlist )
855855 case int_result do
856856 :error -> :error
857- _ -> { float ( int_result ) , list_to_binary ( int_remainder ) }
857+ _ -> { :erlang . float ( int_result ) , list_to_binary ( int_remainder ) }
858858 end
859859 _ -> { result , list_to_binary ( remainder ) }
860860 end
Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ in_erlang_functions() ->
381381 { byte_size , 1 },
382382 % { date, 0 },
383383 { exit , 1 },
384- { float , 1 },
384+ % { float, 1 },
385385 { float_to_binary , 1 },
386386 { float_to_list , 1 },
387387 { hd , 1 },
You can’t perform that action at this time.
0 commit comments