Created
November 18, 2014 05:39
-
-
Save owickstrom/0164cde18d2b06b1deb4 to your computer and use it in GitHub Desktop.
Missing binary concatenation operator in Elixir gives no warning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule BinaryConcat do | |
def run do | |
data = | |
<<65, 32, 119, 97>> <> | |
<<114, 110, 105, 110>> # <- binary concatenation operator missing here | |
<<103, 32, 112, 101>> <> | |
<<114, 104, 97, 112, 115, 63>> | |
IO.puts <<data :: binary>> | |
end | |
end | |
BinaryConcat.run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = | |
<<65, 32, 119, 97>> <> | |
<<114, 110, 105, 110>> # <- binary concatenation operator missing here | |
<<103, 32, 112, 101>> <> | |
<<114, 104, 97, 112, 115, 63>> | |
IO.puts <<data :: binary>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment