Skip to content

Instantly share code, notes, and snippets.

@owickstrom
Created November 18, 2014 05:39
Show Gist options
  • Save owickstrom/0164cde18d2b06b1deb4 to your computer and use it in GitHub Desktop.
Save owickstrom/0164cde18d2b06b1deb4 to your computer and use it in GitHub Desktop.
Missing binary concatenation operator in Elixir gives no warning
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
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